Home Forums Programming Powershell Powershell script to capture SQL service status RE: Powershell script to capture SQL service status

  • A web search using the words "Services Powershell Status" leads to the following:

    get-service -name "MSSQLServer" -Computername TargetServerName

    Which returns

    Status Name DisplayName

    ------ ---- -----------

    Running MSSQLServer SQL Server (MSSQLSERVER)

    For named instances, the format is MSSQLServer$instancename