Get-CMSecurityRole

Gets security roles.

Syntax

Get-CMSecurityRole
   -Id <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMSecurityRole
   [-Name <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The Get-CMSecurityRole cmdlet gets one or more security roles in Microsoft System Center Configuration Manager.

Examples

Example 1: Get all security roles

PS C:\> Get-CMSecurityRole

This command gets all security roles in Configuration Manager.

Example 2: Get a security role by using an ID

PS C:\> Get-CMSecurityRole -Id "SMS000CR"

This command gets the security role that has the ID SMS000CR.

Example 3: Get a security role by using a wildcard

PS C:\> Get-CMSecurityRole -Name App*

This command gets all security roles that have a name that starts with App.

Required Parameters

-Id

Specifies an array of IDs of security roles.

Type:String
Aliases:RoleId
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies an array of names of security roles.

Type:String
Aliases:RoleName
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False