Check SQL Server Database Status
It's been a month since my last post. Today I am posting a function that can be used to check the status of MS SQL Server databases. At the current moment, I am not sure about the limitations on where this script works like which versions of Windows OS or supported MS SQL Server versions. I have been using the script on my laptop where I have installed Windows 10 OS and SQL Server 2014 Developer Edition. SQL Server Developer edition can be downloaded from here . There are multiple methods to connect to a SQL Server instance from Powershell. I found this very useful article on sqlshack . The script in this post makes use of the SQLPS module. <# . Synopsis Check database status on MS SQL Server instances. . DESCRIPTION Check the database status on one or a list of MS SQL Server instances. . Parameter ServerInstance Provide the server instance to connect to in case of a named instance servername\instancename. . EXAMPLE Get-DBStatus -Serv...