Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Copy-CMSecurityRole

Updated: February 7, 2014

Applies To: System Center 2012 R2 Configuration Manager

Copy-CMSecurityRole

Creates a custom security role.

Syntax

Parameter Set: CopyFromId
Copy-CMSecurityRole -Name <String> -SourceRoleId <String> [-Description <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: CopyFromName
Copy-CMSecurityRole -Name <String> -SourceRoleName <String> [-Description <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: CopyFromValue
Copy-CMSecurityRole -InputObject <IResultObject> -Name <String> [-Description <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Copy-CMSecurityRole cmdlet creates a new security role by using an existing security role as a template. Microsoft System Center 2012 Configuration Manager provides several built-in security roles. If you require additional security roles, you can create a custom security role by creating a copy of an existing security role, and then modifying the copy.

Parameters

-Description<String>

Specifies the description of a security role.


Aliases

RoleDescription

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<IResultObject>

Specifies a CMSecurityRole object. To obtain a CMSecurityRole object, use the Get-CMSecurityRole cmdlet.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies a name for the new security scope.


Aliases

RoleName

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

true

-SourceRoleId<String>

Specifies the ID of a security role.


Aliases

CopiedFromId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SourceRoleName<String>

Specifies the name of a security role.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

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: Copy a security role by using an ID

This command creates a new security role named SecRole02 by copying the security role that has the ID SMS000CR.


PS C:\> Copy-CMSecurityRole -Name "SecRole02" -SourceRoleId "SMS000CR"

Example 2: Copy a security role by using a name

This command creates a new security role named SecRole02 by copying the security role named Software Update Manager.


PS C:\> Copy-CMSecurityRole -Name "SecRole02" -SourceRoleName "Software Update Manager"

Example 3: Copy a security role

The first command gets the security role named Software Update Manager and stores it in the $Srole variable.

The second command creates a new security role named SecRole02 by copying the object stored in $Srole.


PS C:\> $Srole = Get-CMSecurityRole -Name "Software Update Manager"
PS C:\> Copy-CMSecurityRole -InputObject $Srole -Name "SecRole02"

Related topics

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.