Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 2.28 KB

service-fabric-powershell-change-rdp-user-and-pw.md

File metadata and controls

44 lines (30 loc) · 2.28 KB
title description services author manager ms.service ms.topic ms.date ms.author ms.custom
Update the RDP username and password in PowerShell
Azure PowerShell Script Sample - Update the RDP username and password for all Service Fabric cluster nodes of a specific node type.
service-fabric
athinanthny
chackdan
azure-service-fabric
sample
03/19/2018
atsenthi
mvc, devx-track-azurepowershell

Update the admin username and password of the VMs in a cluster

Each node type in a Service Fabric cluster is a virtual machine scale set. This sample script updates the admin username and password for the cluster virtual machines in a specific node type. Add the VMAccessAgent extension to the scale set, because the admin password is not a modifiable scale set property. The username and password changes apply to all nodes in the scale set. Customize the parameters as needed.

[!INCLUDE updated-for-az]

If needed, install the Azure PowerShell using the instruction found in the Azure PowerShell guide.

Sample script

[!code-powershellmain]

Script explanation

This script uses the following commands: Each command in the table links to command specific documentation.

Command Notes
Get-AzVmss Gets the properties of a cluster node type (a virtual machine scale set).
Add-AzVmssExtension Adds an extension to the virtual machine scale set.
Update-AzVmss Updates the state of a virtual machine scale set to the state of a local VMSS object.

Duration

A single node type with five nodes, for example, has a duration of 45 to 60 minutes to change the username or password.

Next steps

For more information on the Azure PowerShell module, see Azure PowerShell documentation.

Additional Azure PowerShell samples for Azure Service Fabric can be found in the Azure PowerShell samples.