Skip to content

windows_sevices

Dan Iverson edited this page Mar 9, 2018 · 2 revisions

title: Windows Services layout: en permalink: /posts/admin/windows_services/

Start/Stop Services

The built-in cmdlets are great for starting and stopping a group of services. If you have Powershell Remoting enabled, you can use the -computername parameter to pass in a server or list of servers to execute the command remotely.

Start

get-service -name psft* -computername <server or server,list> | start-service

Stop

get-service -name psft* -computername <server or server,list> | stop-service

Delete Services

Since there is no delete-service cmdlet, use this command to delete services by name. For each service that contains "psft", loop through the services and delete them.

Get-WmiObject -Class Win32_Service -Filter "name like 'Psft%'" | % { $_.delete() }

You can also drop into a Command Prompt and use sc to delete a service.

cmd /c sc delete PsftAppServerDomainAPPDOMService
Clone this wiki locally