-
Notifications
You must be signed in to change notification settings - Fork 10
windows_sevices
Dan Iverson edited this page Mar 9, 2018
·
2 revisions
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
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