Get-SqlServerPermission
Gets an SMO ServerPermissionInfo object.
Syntax
Get-SqlServerPermission [-sqlserver] <Object> [<CommonParameters>]
Detailed Description
The Get-SqlServerPermission function gets a collection of SMO ServerPermissionInfo 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-SqlServerPermission
Return Values
Microsoft.SqlServer.Management.Smo.ServerPermissionInfo
Get-SqlServerPermission returns a Microsoft.SqlServer.Management.Smo.ServerPermissionInfo object.
Notes
Additional properties including the effective members of the ServerPermissionInfo are returned. Nested AD/local groups are recursively enumerated and returned in a flat structure. There are only three grantable permissions only applicable to the master database: CREATE DATABASE; BACKUP DATABASE; BACKUP LOG. These permission are included in the output. SQL 2000 does not support this SMO method, instead a System.DataRow is returned of master database permissions.
Examples
EXAMPLE 1
Get-SqlServerPermission "Z002\sql2K8"
This command gets a collection of SMO ServerPermissionInfo objects for SQL Server Z002\SQL2K8.