dbatools is a free PowerShell module with over 200 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaAgHadr

Gets the Hadr setting, from the service level, and returns true or false for the specified SQL Server instance.

Screenshots

dbatools-Get-DbaAgHadr

Examples

Returns a status of the Hadr setting for sql2016 SQL Server instance.

Get-DbaAgHadr -SqlInstance sql2016

Author

This command was created by Shawn Melton. You can find Shawn on Twitter and his blog.

Get-Help

From PowerShell, execute Get-Help Get-DbaAgHadr -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaAgHadr.ps1 on GitHub
 

Related commands