We have a powershell script, that needs to be runned as a domain admin in order to create some AD groups.
We want to be able to have this script runned after the VM deployment is finished. However, this script is then runned as the local admin of that system. Not as a domain admin. How can I solve this?
You didn't specify if you use an OSCustomizationSpec with the deployment.
In any case, you can wait for the completion of an OSCustomization by looking for the CustomizationSucceeded event.
If you don't use an OSCustomization, you can just wait for the VMware Tools to become available after the poweron of the VM.
After that you can use Invoke-VMScript to run a script inside the Guest OS of the VM.
Hi, I am using VM Customization Specifications from the web interface. Then I have selected commands to run once
I can get the script to run, however it is as the local account, not as a domain account