Compartilhar via


Get-CMSecurityRole

Get-CMSecurityRole

Gets security roles.

Syntax

Parameter Set: SearchByName
Get-CMSecurityRole [-Name <String[]> ] [ <CommonParameters>]

Parameter Set: SearchByIdMandatory
Get-CMSecurityRole -Id <String[]> [ <CommonParameters>]

Detailed Description

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

Parameters

-Id<String[]>

Specifies an array of IDs of security roles.

Aliases

RoleId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String[]>

Specifies an array of names of security roles.

Aliases

RoleName

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

true

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Get all security roles

This command gets all security roles in System Center 2012 Configuration Manager.

PS C:\> Get-CMSecurityRole

Example 2: Get a security role by using an ID

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

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

Example 3: Get a security role by using a wildcard

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

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

Set-CMSecurityRole

Copy-CMSecurityRole

Export-CMSecurityRole

Import-CMSecurityRole

Remove-CMSecurityRole

Remove-CMSecurityRoleFromAdministrativeUser