Check SQL Server related services on several machines

With this PowerShell script you can easily check all SQL Server related services for all servers of a given list.

 
 
 
 
 
5 Star
(6)
4,474 times
Add to favorites
Databases
8/16/2011
E-mail Twitter del.icio.us Digg Facebook
  • I am getting below error while running the pwershell
    1 Posts | Last post November 20, 2019
    • At line:11 char:13
      +             | Sort-Object -property name;
      +             ~
      An empty pipe element is not allowed.
          + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
          + FullyQualifiedErrorId : EmptyPipeElement
  • Error
    2 Posts | Last post January 26, 2016
    • [Array] $servers = "Server1" ` 
                       , "Server2" ` 
                       , "Server3"; 
      
      While running the script, getting the following error
      
      PS U:\DBA> U:\DBA\SQLServicesState.ps1
      Unexpected token '` ' in expression or statement.
      At U:\DBA\SQLServicesState.ps1:3 char:37
      + [Array] $servers = "ODH004HRST01" `  <<<< 
          + CategoryInfo          : ParserError: (` :String) [], ParentContainsErrorRecordException
          + FullyQualifiedErrorId : UnexpectedToken
    • Have you download the script or did you copy&paste it?
      The apostrophe ` is the line continuation sign in PoSh; do your script have separate line (new line) after this sign?