Reputation: 199
I am running powershell command on my local machine to start a batch file on remote server. However, the server always returns the echo outputs of the batch file to my local machine, which is not what i want. Can we execute commands on server and let server keep the output information?
Thanks in advance!
Upvotes: 0
Views: 357
Reputation: 1068
Have you tried Invoke command?
Invoke-Command -ComputerName machinename -ScriptBlock {ipconfig > C:\temp.txt}
Upvotes: 1