Copy-CMSecurityRole

Copy-CMSecurityRole

Creates a custom security role.

構文

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>]

詳細説明

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.

パラメーター

-Description<String>

Specifies the description of a security role.

エイリアス

RoleDescription

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-InputObject<IResultObject>

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

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Name<String>

Specifies a name for the new security scope.

エイリアス

RoleName

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

true

-SourceRoleId<String>

Specifies the ID of a security role.

エイリアス

CopiedFromId

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-SourceRoleName<String>

Specifies the name of a security role.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

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"

関連トピック

Get-CMSecurityRole

Set-CMSecurityRole

Remove-CMSecurityRole

Import-CMSecurityRole

Export-CMSecurityRole

Remove-CMSecurityRoleFromAdministrativeUser