Get‑SqlDscServerPermission - dsccommunity/SqlServerDsc GitHub Wiki
Returns the current permissions for the principal.
Get-SqlDscServerPermission [-ServerObject] <Server> [-Name] <String>
[<CommonParameters>]
Returns the current permissions for the principal.
$serverInstance = Connect-SqlDscDatabaseEngine
Get-SqlDscServerPermission -ServerObject $serverInstance -Name 'MyPrincipal'
Get the permissions for the principal 'MyPrincipal'.
Specifies the name of the principal for which the permissions are returned.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies current server connection object.
Type: Server
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
If specifying -ErrorAction 'SilentlyContinue'
then the command will silently
ignore if the principal (parameter Name) is not present.
In such case the
command will return $null
.
If specifying -ErrorAction 'Stop'
the command
will throw an error if the principal is missing.