Export (0) Print
Expand All
Expand Minimize

Set-CMComputerAssociation

Updated: September 1, 2013

Applies To: System Center 2012 Configuration Manager SP1

Set-CMComputerAssociation

Changes settings for a computer association in Configuration Manager.

Syntax

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




Detailed Description

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.

Parameters

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DestinationComputer<String>

Specifies the name of a destination computer.


Aliases

RestoreName

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

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-CMAssociation cmdlet. The computer association can specify that the migration process creates some or all of those accounts on the destination computer.

The acceptable values for this parameter 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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SourceComputer<String>

Specifies the name of the source computer.


Aliases

SourceName

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

This command changes the association between the computer named TSQA073 and TSQA155. The command adds the user ContosoTSQA\ThomasAndersen and removes the user ContosoTSQA\SarahJones. 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\ThomasAndersen" -MigrationBehavior CaptureAllUserAccountsAndRestoreSpecifiedAccounts -RemoveMigrationUserName "ContosoTSQA\SarahJones"

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft