Set-CMComputerAssociation

Set-CMComputerAssociation

Changes settings for a computer association in Configuration Manager.

構文

Parameter Set: NewComputerAssociation
Set-CMComputerAssociation -DestinationComputer <String> -SourceComputer <String> [-AddMigrationUserName <String[]> ] [-MigrationBehavior <MigrationBehavior> {CaptureAllUserAccountsAndRestoreSpecifiedAccounts | CaptureAndRestoreAllUserAccounts | CaptureAndRestoreSpecifiedUserAccounts} ] [-RemoveMigrationUserName <String[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Set-CMComputerAssociation cmdlet changes settings for a computer association used for migration. Microsoft System Center 2012 Configuration Manager can migrate user state and settings from an existing computer to a different computer as part of operating system deployment. In the course of migration, System Center 2012 Configuration Manager saves accounts created on the source computer and creates those user accounts on the destination computer.

A computer association contains the user names to be migrated and how to deal with other user names from the source computer. You can use this cmdlet to modify an association. You can add user names to the association, or remove user names. You can also change whether System Center 2012 Configuration Manager includes other user names from the source computer.

パラメーター

-AddMigrationUserName<String[]>

Specifies an array of user names for accounts created on the source computer. The cmdlet adds these user names to the current specified user names of the computer association.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-DestinationComputer<String>

Specifies the name of a destination computer.

エイリアス

RestoreName

必須?

true

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-MigrationBehavior<MigrationBehavior>

Specifies how Configuration Manager treats user accounts created on the source computer. When you create a computer association, specify user accounts created on the source computer by using the MigrationUserName parameter of the New-CMComputerAssociation cmdlet. The computer association can specify that the migration process creates some or all of those accounts on the destination computer.

Valid values are:

-- CaptureAllUserAccountsAndRestoreSpecifiedAccounts. Saves all accounts created on the source computer, but creates only the specified accounts on the destination computer.
-- CaptureAndRestoreAllUserAccounts. Saves all accounts created on the source computer, and creates them on the destination computer.
-- CaptureAndRestoreSpecifiedUserAccounts. Saves only the specified accounts from the source computer, and creates those accounts on the destination computer.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-RemoveMigrationUserName<String[]>

Specifies an array of user names for accounts created on the source computer. The cmdlet removes these user names from current specified user names of the computer association.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-SourceComputer<String>

Specifies the name of the source computer.

エイリアス

SourceName

必須?

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: Modify a computer association

This command changes the association between the computer named TSQA073 and TSQA155. The command adds the user ContosoTSQA\EvanNarvaez and removes the user ContosoTSQA\ElisaDaugherty. The command specifies the migration behavior as CaptureAllUserAccountsAndRestoreSpecifiedAccounts, so the association causes the migration to save all accounts created on the source computer, but only to create the accounts specified by the computer association on the destination computer.

PS C:\> Set-CMComputerAssociation -DestinationComputer "TSQA155" -SourceComputer "TSQA073" -AddMigrationUserName "ContosoTSQA\EvanNarvaez" -MigrationBehavior CaptureAllUserAccountsAndRestoreSpecifiedAccounts -RemoveMigrationUserName "ContosoTSQA\ElisaDaugherty"

関連トピック

Get-CMComputerAssociation

New-CMComputerAssociation

Remove-CMComputerAssociation