Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, June 24, 2015 8:16 PM | 2 votes
Hi everybody,
I am trying to reset the password for the local administrator account on my Azure virtual machine. This is the procedure I've been following:
- Go to portal.azure.com
- Locate my virtual machine
- Click All settings --> Password reset
- Enter a user name and a password (with captial letter, non-capital letters, digits and symbol)
- Click Reset password
I now get an error saying "Failed to reset the password for virtual machine" with no further explanation. What am I doing wrong?
All replies (8)
Friday, June 26, 2015 7:58 AM âś…Answered
Hi,
Thank you for your post. Apologies for the performance issue. From a support perspective the way forward would be to open up a support ticket as we would need to do analysis. Also we might have to access your PUID information which cannot be done on the public forum I encourage you to do the same.
Please refer to this documentation on how to open a support ticket. Hope this helps.
Warm Regards;
Thursday, June 25, 2015 4:20 AM
Hi,
You can use Windows PowerShell to perform a variety of tasks in Azure, either interactively at a command prompt or automatically through scripts. Azure PowerShell is a module that provides cmdlets to manage Azure through Windows PowerShell.
I see that you have access to the portal, thereby access to your accounts please try these commands on Powershell, this will help you recreate a new username and password, I've tried to test this in my lab and it works 100%
Get-AzureVM -ServiceName <<CLoudServiceName>> -Name <<VMName>> | Set-AzureVMAccessExtension -UserName <<NewUserName>> -Password <<NewPassword>> | Update-AzureVM
If by any chance you are not familiar with Powershell then you could either contact someone in your organization who is familiar with PS or else the last recourse left with us is to delete the VM (if you have important data on the drive make sure you retain the disc, and spin up a new VM and attach the saved disc as another disk thereby enabling you access to your data.
Please refer the link :
https://azure.microsoft.com/en-gb/documentation/articles/virtual-machines-windows-reset-password/
Regards.
Thursday, June 25, 2015 8:43 AM
Thanks for your response. Via the latter link you posted, I have been trying to connect to Azure via PS. I have been trying with both Azure AD method and the certificate method - in both cases I get the following error, when I run Get-AzureVM:
"ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and
is associated with this subscription."
Do I need to use a certificate, and how does that work?
As you mention, I could alternatively download the VHD from the VM and attach the disc to a new VM. But when I run this command, I get the same error as above:
Save-AzureVhd -Source https://somethingsomething.blob.core.windows.net/vhds/mymachinename.vhd -LocalFilePath C:\some\path\mymachinename.vhd
Please advice.
And why can't I reset the password via the portal?
Thursday, June 25, 2015 10:30 AM
You do not need to use a certificate,
- Download and install Azure Powershell https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/
- Use the following commad to connect to your accout
Add-AzureAccount
- Then you can select your subscription if it's not the default one
Select-AzureSubscription -Name 'Subsname'
- Type your powershell commands
Look here for more information of how to reset the password
Regards, Samir Farhat || Datacenter Consultant || The way to share my knowledge with the community Visit my blog : buildwindows.wordpress.com
Thursday, June 25, 2015 10:35 AM
That is exactly what I've done. After "Select-AzureSubscription" I use "Get-AzureVM" and then I get the certificate error
Thursday, June 25, 2015 10:41 AM
Try to remove old azure accounts info from your cache
AllAzureAccounts = Get-AzureAccount
foreach ( $AllAzureAccount in $AllAzureAccounts ) {Remove-AzureAccount -Name $AllAzureAccount.Id -Force }
Regards, Samir Farhat || Datacenter Consultant || The way to share my knowledge with the community Visit my blog : buildwindows.wordpress.com
Thursday, June 25, 2015 10:48 AM
Same result:
PS C:\> $AllAzureAccounts = Get-AzureAccount
PS C:\> foreach ( $AllAzureAccount in $AllAzureAccounts ) {Remove-AzureAccount -Name $AllAzureAccount.Id -Force }
WARNING: The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select
a new default subscription.
PS C:\> Add-AzureAccount
VERBOSE: Account "xxxxxx" has been added.
VERBOSE: Subscription "yyyyyy" is selected as the default subscription.
VERBOSE: To view all the subscriptions, please use Get-AzureSubscription.
VERBOSE: To switch to a different subscription, please use Select-AzureSubscription.
Id Type Subscriptions Tenants
--
xxxxxxxxxxxxx User zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz
PS C:\> Select-AzureSubscription -Name 'yyyyyy'
PS C:\> Get-AzureVM
Get-AzureVM : ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and i
s associated with this subscription.
At line:1 char:1
+ Get-AzureVM
+ ~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureVM], CloudException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.GetAzureVMCommand
Wednesday, August 26, 2015 12:29 PM
I have this issue too.
Any progress?