Forum Discussion
John_Dodo
Oct 17, 2022Brass Contributor
Replace psexec with native powershell commands
Hello, we have a remotely located ($remoteserver1) script that we want to run on the said remote computer ($remoteserver1) from a "controler" server (via a scheduled task). As of today in a C...
LainRobertson
Oct 17, 2022Silver Contributor
Do you get anything printed out if you insert the following line before the actual Shutdown-VMGuest command in vmware.ps1?
Write-Host "Shutdown-VMGuest -VM $vmname -Confirm:`$false";
So, it'd look like this:
write-host "2a";
Write-Host "Shutdown-VMGuest -VM $vmname -Confirm:`$false";
Shutdown-VMGuest -VM $vmname -Confirm:$false;
Cheers,
Lain
John_Dodo
Oct 26, 2022Brass Contributor
Hi Lain,
I would get the expected output form the write-host yes. Not sure what you try to demonstrate though. 🙂