Created
July 28, 2015 14:17
-
-
Save Kevin-Bronsdijk/5696cd236f042fc5acd9 to your computer and use it in GitHub Desktop.
azure-virtual-machine-reset-the-username
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vmc = Get-AzureVM -ServiceName $serviceName -Name $vmName | |
$vmc.VM.ProvisionGuestAgent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vmName = "name of the VM" | |
$serviceName = "name of the sercvice" | |
$newAdminUserName = "name of the user" | |
$newAdminPassword = "the password" | |
$vmc = Get-AzureVM -ServiceName $serviceName -Name $vmName | |
$vmc | Set-AzureVMAccessExtension -UserName $newAdminUserName -Password $newAdminPassword | |
$vmc | Update-AzureVM | |
Restart-AzureVM -ServiceName $serviceName -Name $vmName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment