dbatools is a free PowerShell module with over 300 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-DbaRegisteredServerGroup

Returns an array of Server Groups found in the CMS.

Screenshots

dbatools-Get-DbaRegisteredServerGroup

Examples

Gets the top level groups from the CMS on sqlserver2014a, using Windows Credentials.

Get-DbaRegisteredServerGroup -SqlInstance sqlserver2014a

Gets the top level groups from the CMS on sqlserver2014a, using SQL Authentication to authenticate to the server.

Get-DbaRegisteredServer -SqlInstance sqlserver2014a -SqlCredential $credential

Gets the HR and Accounting groups from the CMS on sqlserver2014a.

Get-DbaRegisteredServer -SqlInstance sqlserver2014a -Group HR, Accounting

Returns the sub-group Development of the HR group from the CMS on sqlserver2014a.

Get-DbaRegisteredServer -SqlInstance sqlserver2014a -Group HR\Development

Author

This command was created by Tony Wilhelm. You can find Tony on Twitter.

Get-Help

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

Source Code

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

Related commands