Skip to content

Commit e3c1817

Browse files
authored
Merge pull request #202856 from alexandair/an-az-aks-ops-winfaq
Add PowerShell tab
2 parents 4f67eb7 + fbe06cb commit e3c1817

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

articles/aks/windows-faq.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ Instead of service principals, use managed identities, which are essentially wra
8080

8181
## How do I change the administrator password for Windows Server nodes on my cluster?
8282

83+
### [Azure CLI](#tab/azure-cli)
84+
8385
When you create your AKS cluster, you specify the `--windows-admin-password` and `--windows-admin-username` parameters to set the administrator credentials for any Windows Server nodes on the cluster. If you didn't specify administrator credentials when you created a cluster by using the Azure portal or when setting `--vm-set-type VirtualMachineScaleSets` and `--network-plugin azure` by using the Azure CLI, the username defaults to *azureuser* and a randomized password.
8486

8587
To change the administrator password, use the `az aks update` command:
@@ -96,6 +98,25 @@ az aks update \
9698
>
9799
> When you're changing `--windows-admin-password`, the new password must be at least 14 characters and meet [Windows Server password requirements][windows-server-password].
98100
101+
### [Azure PowerShell](#tab/azure-powershell)
102+
103+
When you create your AKS cluster, you specify the `-WindowsProfileAdminUserPassword` and `-WindowsProfileAdminUserName` parameters to set the administrator credentials for any Windows Server nodes on the cluster. If you didn't specify administrator credentials when you created a cluster by using the Azure portal or when setting `-NodeVmSetType VirtualMachineScaleSets` and `-NetworkPlugin azure` by using the Azure PowerShell, the username defaults to *azureuser* and a randomized password.
104+
105+
To change the administrator password, use the `Set-AzAksCluster` command:
106+
107+
```azurepowershell
108+
$cluster = Get-AzAksCluster -ResourceGroupName $RESOURCE_GROUP -Name $CLUSTER_NAME
109+
$cluster.WindowsProfile.AdminPassword = $NEW_PW
110+
$cluster | Set-AzAksCluster
111+
```
112+
113+
> [!IMPORTANT]
114+
> Performing the `Set-AzAksCluster` operation upgrades only Windows Server node pools. Linux node pools are not affected.
115+
>
116+
> When you're changing the Windows administrator password, the new password must be at least 14 characters and meet [Windows Server password requirements][windows-server-password].
117+
118+
---
119+
99120
## How many node pools can I create?
100121

101122
The AKS cluster can have a maximum of 100 node pools. You can have a maximum of 1,000 nodes across those node pools. For more information, see [Node pool limitations][nodepool-limitations].

0 commit comments

Comments
 (0)