Hello @Vedanth Pulipati ,
I did run the same command on my VM and it went through successfully. Once it runs VM will go to Stopped State.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
i am trying to run the sysprep before converting it into an image
i have used the following command for the sysprep
az vm run-command invoke --command-id RunPowerShellScript -g $resourceGroupName -n $serverName --scripts .\resources\win-vm\sysprep.ps1
in the file sysprep.ps1 consists the below command
C:\WINDOWS\system32\sysprep\sysprep.exe /generalize /shutdown /oobe
the below is the error i am facing
Hello @Vedanth Pulipati ,
I did run the same command on my VM and it went through successfully. Once it runs VM will go to Stopped State.
Hello @Vedanth Pulipati ,
Can you try out Invoke-AzVMRunCommand ?
Sample example:
Invoke-AzVMRunCommand -ResourceGroupName syspredemo -VMName sysprepdemo -CommandId "RunPowerShellScript" -ScriptPath "C:\aks\date.ps1"
Let me know if that helps !