Category Archives: PowerShell

How to change a service startup type with PowerShell

Changing a service startup type can be crucial after installing or configuring the service. PowerShell comes with an easy way to do so: Set-Service –Name theservice –Computer thecomputer –StartupType “selectedType” Where selectedType value can be: Automatic Manual Disabled Unfortunately, there is no support for the automatic (delayed start). To support the automatic (delayed start), you… Read More »

How to start or stop a remote service with PowerShell

An easy trick but often helpful in need of automation. I recently noticed that it was not possible to do: Start-Service –Name theservice –Computer thecomputer Instead we have to follow this rather ugly way: (Get-WmiObject -computerName thecomputer Win32_Service -Filter “Name=’theservice'”).StartService() To stop the service, same idea: (Get-WmiObject -computerName thecomputer Win32_Service -Filter “Name=’theservice'”).StopService()   0 Kudos… Read More »