for software update, need know if specific service runs on computers. , if not, need start service on missing devices.
is there possibility realize in c# or powershell?
in powershell you'd use *-service
cmdlets. get-service
can query services on remote hosts via -computername
parameter. returned services can filtered , piped start-service
:
$servers = 'foo', 'bar', 'baz', ... get-service -computername $servers -name 'svcname' | ? { $_.status -eq 'stopped' } | start-service
Comments
Post a Comment