I am trying to deploy VM's from templates in VMware, but I having problems with OSCustomization, so I thought I would just run sysprep from Invoke-VMScript.
Before trying to make it work in the PowerCli cmdlet, I thought I would just see if I could run Sysprep from with PowerShell.
$command = "C:\Windows\System32\Sysprep\Sysprep.exe /generalize /oobe /shutdown /quiet"
Invoke-Expression -command "$command"
I am running this on a 2012 r2 server and I am getting this window popping up:
If no command-line arguments are provided, a graphical user interface is used to select the desired Sysprep operations.
What am I missing?