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

  • schleep (8/28/2013)


    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

    Thank you for your reply.

    I get the error : This operation might require other privileges when I try to connect with SQL authentication in place.

    It works fine when I try on my local machine for 1 instance where I know my AD permission has the required privs.

    I need to connect with SQL authentication as I am trying to go cross domains.