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,