Skip to content

ConvertTo‑SqlDscServerPermission

dscbot edited this page Oct 26, 2024 · 1 revision

SYNOPSIS

Converts a collection of Microsoft.SqlServer.Management.Smo.ServerPermissionInfo objects into an array of ServerPermission objects.

SYNTAX

ConvertTo-SqlDscServerPermission [-ServerPermissionInfo] <ServerPermissionInfo[]>
 [<CommonParameters>]

DESCRIPTION

Converts a collection of Microsoft.SqlServer.Management.Smo.ServerPermissionInfo objects into an array of ServerPermission objects.

EXAMPLES

EXAMPLE 1

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

Get all permissions for the principal 'MyPrincipal' and converts the permissions into an array of [ServerPermission\[]\].

PARAMETERS

-ServerPermissionInfo

Specifies a collection of Microsoft.SqlServer.Management.Smo.ServerPermissionInfo objects.

Type: ServerPermissionInfo[]
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

[ServerPermission[]]

NOTES

RELATED LINKS

Home

Commands

Resources

Usage

Clone this wiki locally