This is an old revision of the document! PowerShell Direct (Guest Scripting) Command Invokation Invoke-Command -VMName <VM> -Credential (Get-Credential) -ScriptBlock { <Any PowerShell commands to run inside the VM> }