How to check Azure Virtual Machine username and password?

You must verify that the Azure Virtual Machine username and password are correct.

Now the following code is used to verify the name and password of the virtual machine.

$SecureVmPassword = ConvertTo-SecureString -string $VmPassword -AsPlainText -Force $VmCredential = New-Object -typename System.Management.Automation.PSCredential -argumentlist $Fqdn"\"$VmUsername, $SecureVmPassword Invoke-Command -ConnectionUri $RemoteConnectionUri.ToString() -Credential $VmCredential -ScriptBlock{ } 

But you cannot verify the credentials of the virtual machine while the virtual machines are in a shutdown state.

Is there a way to verify the credentials of a virtual machine even when the virtual machines are in a shutdown state?

+5
source share
1 answer

No. You are trying to verify credentials on an inactive remote object (disabled virtual machine). You will need to either access its local drive and SAM database (if it is not a DC), or the NTDS database (if it is using DC), and then analyze it in your active computing resources to verify the credentials provided. This is a kind of tearing of one intestine to check if your food will be digested there. Thus, if the target virtual machine is disabled, you need to skip credential verification or use domain credentials that will be valid for this particular virtual machine, but can be verified on some other resource (DC domain).

+1
source

Source: https://habr.com/ru/post/1266533/


All Articles