I'm trying to write a PowerShell script to start multiple services for a computer list in a txt file. I know there has to be a way, but I'm running in circles trying to figure it out. My latest test is
Get-ContentD:\Scripts\test.txt|Foreach-Object{Get-Service-Name 'spooler'|Set-Service-StatusRunning}
Which starts the service on the server I'm running the script from. Also, the services I want to run are not on the server.
I'd appreciate any help.