Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Syntax

$cs.Service_Stop(string servicename, int maxTimeout=60000)

Parameters

servicename

Service name to stop

...

Max timeout in milliseconds (default is 60 seconds)

Example

Code Block
languagepowershell
if ($cs.Service_Exist('gupdate')){$cs.Service_Stop('gupdate')}
#or
if ($cs.Service_Exist('gupdate.exe')){$cs.Service_Stop('gupdate.exe',30000)}

...