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

Is this a bug? Start-Service | stop-Service

$
0
0

Hello,

I just ran into an interesting problem when stopping a service on a remote computer. 

Get-service -name healthservice 

# This returns my local healthservice, happily running

Get-service -name healthservice -computername OtherComputer

#This returns the remote service running

Get-service -name healthservice -computername OtherComputer | Stop-Service

#This doesn't return any errors

Get-service -name healthservice -computername OtherComputer

# this returns the remote service still listed as running

Get-service -name healthservice

#This returns my local healthservice now stopped

What the heck!?!  Do I have to use WMI to do this correctly?  and why does stop service kill the local health service? This feels like a connect bug in the making...


Hope that helps! Jason


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>