DbaSqlServiceStatus
Is this a feature OR bug: Enhancement
https://trello.com/c/hR2S40RU
Just a thought of doing something like either Get-x or Test-x.
It goes through to validate the service status for SQL Server, and other components if requested by flag. Could just be Get-DbaSqlServices possibly for just pulling the status of each service SQL Server would install.
Scenario: Your SA team just completed a weekend of patching the environment and you need to verify that SQL Server is up and running on all the servers. This can include validating cluster services for SQL Server as well. I have Test-DbaSqlService -Servers $myServers -Emergency
The emergency flag is just a thought on having a flag that returns the minimal, and gives the quickest answer possible. Maybe just returning server name and a status column of "your good" or "need to check". "Need to check" would be if we could not get an answer in a timely response just let them know manual intervention is required.
I would suggest this use CIM and not WMI (it will be more efficient for remote servers).
Additional comments
https://github.com/sqlcollaborative/dbareports/blob/Development/samples/Tests/Estate.Tests.ps1 Uses WMI for backward compat for the estate it was written on
this can be now very well be written as a wrapper around Get-DbaSqlService
Get-DbaSqlService -ComputerName $server | where Startmode -eq Automatic | where State -ne Runn
ing
@SirCaptainMitch : please confirm is this can be good or a new cmdlet is still needed
Agreed - I'll leave it as new command. darn i wish there was another palce to keep track. makes our issues seem overwhelming
Get-DbaSqlService is good enough!