Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Stop-Service Start-Service Powershell Basics


Published on

Published in: Software
  • Be the first to comment

Stop-Service Start-Service Powershell Basics

  1. 1. Stop-Service Start-Service Powershell #Stop a specific service Stop-Service SQLBrowser #Stop the Service by viewing the services and then filtering "*sql*" | Get-Service "*sql*" | Get-Service | where {$_.Name -eq "SQLWriter"} | Stop-Service "*sqlwriter*" | Stop-Service #Forcefully stopping the services, by asking confirmation "*sqlwriter*" | Get-Service | Stop-Service -Force -Confirm #Start Service Start-Service -name eventlog #Start all the sql* services, which are not currently running "*sql*" | get-service | where {$_.status -eq "Stopped"} | Start-Service #set the service startup type to manual "*sql*" | get-service | set-service -startuptype manual #Check the service startup type Get-WMIObject Win32_Service | Select-Object Name, Caption, StartMode | where {$_.Name -like '*sql*'}