Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

powershell restart-service on many computers

$
0
0

I need to remote restart a service on a bunch of machines.  This command works great on a single machine:  

Restart-Service -InputObject $(Get-Service -Computer computer1 -Name service1);

But I need to pipe/input a list of many computers in place of computer1. Is there a quick and easy way to do that?

Thank you,


Viewing all articles
Browse latest Browse all 21975

Trending Articles