Using Powershell to stop services on remote computers

$service = “Service-to-be-stopped”
$computer = “computername-laptop”

(Get-WmiObject -computerName $computer Win32_Service -Filter “Name=’$service'”).StopService()

(Get-WmiObject -computerName $computer Win32_Service -Filter “Name=’$service'”).ChangeStartMode(“Disabled”)

(Get-WmiObject -computerName $computer Win32_Service -Filter “Name=’$service'”)

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: