PowerTip: Use PoweShell to Start Service on Remote Machine

Doctor Scripto

Summary: Learn how to use Windows PowerShell to start a service on a remote machine.

Hey, Scripting Guy! Question How can I start a service on a remote machine?

Hey, Scripting Guy! Answer To start a service on a local machine:

Get-Service -Name bits  | Start-service

But if you try to use the same technique on a remote machine, it tries to start the service on your local machine:

Get-Service -Name bits  -ComputerName RSLAPTOP01 | Start-service

So you have to use Set-Service:

Get-Service -Name bits -ComputerName RSLAPTOP01 | Set-Service -Status Running

0 comments

Discussion is closed.

Feedback usabilla icon