Get-SqlServerRole
Gets an SMO ServerRole object.
Syntax
Get-SqlServerRole [-sqlserver] <Object> [<CommonParameters>]
Detailed Description
The Get-SqlServerRole function gets a collection of SMO ServerRole objects for the specified SQL Server.
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
sqlserver |
|
true |
false |
|
Input Type
None
You cannot pipe objects to Get-SqlServerRole
Return Values
Microsoft.SqlServer.Management.Smo.ServerRole
Get-SqlServerRole returns a Microsoft.SqlServer.Management.Smo.ServerRole object.
Notes
Additional properties including the effective members of the ServerRole are returned. Nested AD/local groups are recursively enumerated and returned in a flat structure.
Examples
EXAMPLE 1
Get-SqlServerRole "Z002\sql2K8"
This command gets a collection of SMO ServerRole objects for SQL Server Z002\SQL2K8.