Test‑SqlDscIsRole - dsccommunity/SqlServerDsc GitHub Wiki

SYNOPSIS

Returns whether the database principal exists and is a database role.

SYNTAX

Test-SqlDscIsRole [-ServerObject] <Server> [-Name] <String> 
 [<CommonParameters>]

DESCRIPTION

Returns whether the database principal exist and is a database role.

EXAMPLES

EXAMPLE 1

$serverInstance = Connect-SqlDscDatabaseEngine
Test-SqlDscIsRole -ServerObject $serverInstance -Name 'MyPrincipal'

Returns $true if the principal exist as role, if not $false is returned.

PARAMETERS

-Name

Specifies the name of the database principal.

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

[System.Boolean]

NOTES

RELATED LINKS

⚠️ **GitHub.com Fallback** ⚠️