0
votes
1answer
45 views

Pstools or Powershell or Both

I'm having a problem at the moment deploying and managing windows services and I'm looking for advice on the best course of action. Here's what I have working (below) - the problem is it's a bit ...
2
votes
2answers
5k views

Why does PsExec hang after successfully running a powershell script?

The script is fairly straight forward. Simply tries to start a bunch of windows services. Execution locally works fine when on the target machine. The script is actually executing fine as well when ...
1
vote
2answers
2k views

PSEXEC from powershell

I have been struggling getting powershell to run Psexec. It works fine for single line commands. but i need to call SCOM to put the server in maintenance mode through Psexec... $output = ...
4
votes
2answers
7k views

Why does my PowerShell script hang when called in PSEXEC via a batch (.cmd) file?

I'm trying to remotely execute a PowerShell script using PSEXEC. The PowerShell script is called via a .cmd batch file. The reason we do this is to change the execution policy, run the powershell ...