Skip to content

Get SqlDscServerPermission

dscbot edited this page Mar 3, 2024 · 2 revisions

Get-SqlDscServerPermission

SYNOPSIS

Returns the current permissions for the principal.

SYNTAX

Get-SqlDscServerPermission [-ServerObject] <Server> [-Name] <String> 
 [<CommonParameters>]

DESCRIPTION

Returns the current permissions for the principal.

EXAMPLES

EXAMPLE 1

$serverInstance = Connect-SqlDscDatabaseEngine
Get-SqlDscServerPermission -ServerObject $serverInstance -Name 'MyPrincipal'

Get the permissions for the principal 'MyPrincipal'.

PARAMETERS

-Name

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

-ServerObject

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

[Microsoft.SqlServer.Management.Smo.ServerPermissionInfo[]]

NOTES

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.

RELATED LINKS

Home

General

Commands

Clone this wiki locally