Skip to content

ConvertFrom‑SqlDscDatabasePermission

dscbot edited this page Oct 26, 2024 · 1 revision

SYNOPSIS

Converts a DatabasePermission object into an object of the type Microsoft.SqlServer.Management.Smo.DatabasePermissionSet.

SYNTAX

ConvertFrom-SqlDscDatabasePermission [-Permission] <DatabasePermission> 
 [<CommonParameters>]

DESCRIPTION

Converts a DatabasePermission object into an object of the type Microsoft.SqlServer.Management.Smo.DatabasePermissionSet.

EXAMPLES

EXAMPLE 1

[DatabasePermission] @{
    State = 'Grant'
    Permission = 'Connect'
} | ConvertFrom-SqlDscDatabasePermission

Returns an object of [Microsoft.SqlServer.Management.Smo.DatabasePermissionSet] with all the permissions set to $true that was part of the [DatabasePermission].

PARAMETERS

-Permission

Specifies a DatabasePermission object.

Type: DatabasePermission
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.DatabasePermissionSet]

NOTES

RELATED LINKS

Home

Commands

Resources

Usage

Clone this wiki locally