Hello All,
To save you the long story of it all, due to circumstance, I need to run psexec through POSH to execute a command on a remote machine. My method works just fine, but I would like to know if there's a way to suppress to dos box that pops up, while psexec
is running. Below is my current approach:
$command=netsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes
$computer='\\nyc-byfq4m1'
$proc=gwmi -list Win32_Process
$proc.Create("C:\windows\System32\sysinternals\psexec.exe $computer $command")
Thanks!