Author | Tony Wilhelm (@tonywsql) |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Get-DbaRegServerGroup on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaRegServerGroup.
Gets list of Server Groups objects stored in SQL Server Central Management Server (CMS).
Returns an array of Server Groups found in the CMS.
Get-DbaRegServerGroup
[[-SqlInstance] <DbaInstanceParameter[]>]
[[-SqlCredential] <PSCredential>]
[[-Group] <Object[]>]
[[-ExcludeGroup] <Object[]>]
[[-Id] <Int32[]>]
[-EnableException]
[<CommonParameters>]
PS C:\> Get-DbaRegServerGroup -SqlInstance sqlserver2014a
Gets the top level groups from the CMS on sqlserver2014a, using Windows Credentials.
PS C:\> Get-DbaRegServerGroup -SqlInstance sqlserver2014a -SqlCredential $credential
Gets the top level groups from the CMS on sqlserver2014a, using alternative credentials to authenticate to the server.
PS C:\> Get-DbaRegServerGroup -SqlInstance sqlserver2014a -Group HR, Accounting
Gets the HR and Accounting groups from the CMS on sqlserver2014a.
PS C:\> Get-DbaRegServerGroup -SqlInstance sqlserver2014a -Group HR\Development
Returns the sub-group Development of the HR group from the CMS on sqlserver2014a.
The target SQL Server instance or instances.
Alias | |
Required | False |
Pipeline | true (ByValue) |
Default Value |
Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).
Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.
For MFA support, please use Connect-DbaInstance.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Specifies one or more groups to include from SQL Server Central Management Server.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Specifies one or more Central Management Server groups to exclude.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Get group by Id(s). This parameter only works if the group has a registered server in it.
Alias | |
Required | False |
Pipeline | false |
Default Value |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |