Functions icon indicating copy to clipboard operation
Functions copied to clipboard

SQL Defaults Check

Open skullkiller opened this issue 9 years ago • 1 comments

Hi

First of all, thanks for sharing the code.

Some suggestions to the script:

  • Get-CIMInstance predicts the use of sessions, so to reduce authentication overhead you could use Get-CIMSession and use that
  • Get-Service status can be joined with equivalent Win32_Service call and then Pester the resulting properties separately
  • Both services can be queried at the same time
  • Get-CIMSession can be added in the server connectivity to check for server connectivity
  • Invoke-Command should also be tested at this level for WinRM staus (I think there are other ways to check through CIM)
  • You forgot named instances :P

I know this is just a community sample and as such you might have this implemented in your own scripts, but as "The" SQL Server guy to go on PowerShell :) it would be great that the first 5 could reach the community.

Cheers

skullkiller avatar May 25 '16 19:05 skullkiller

Thank you for your comments. You are right that this is just a sample and intended to give people ideas as well as everyone's environment and defaults are different.

I have updated the script to deal with named instances I have also added a check for PSRemoting enabled prior to running the tests

I shall take the rest of the improvements forward and resolve in the short term

SQLDBAWithABeard avatar May 27 '16 09:05 SQLDBAWithABeard