Edit

Share via


Get-CMComputerAssociation

Gets Configuration Manager computer associations.

Syntax

SearchByName (Default)

Get-CMComputerAssociation
    [-DestinationComputer <String>]
    [-SourceComputer <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [<CommonParameters>]

SearchByIdMandatory

Get-CMComputerAssociation
    -MigrationId <String>
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [<CommonParameters>]

Description

The Get-CMComputerAssociation cmdlet gets computer associations. Configuration Manager uses a computer association to migrate user state and settings as part of operating system deployment. You can specify a source computer, a destination computer, or both. You can also use an ID to specify a computer association.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Get all computer associations

PS XYZ:\> Get-CMComputerAssociation

This command gets all the computer associations for Configuration Manager.

Example 2: Get computer associations for a destination comptuter

PS XYZ:\> Get-CMComputerAssociation -DestinationComputer "West155"

This command gets all the computer associations for the destination computer named West155.

Example 3: Get a computer association by using an ID

PS XYZ:\> Get-CMComputerAssociation -MigrationId "MID1207"

This command gets the computer association that has the ID MID1207.

Parameters

-DestinationComputer

Specifies the name of a destination computer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:RestoreName

Parameter sets

SearchByName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MigrationId

Specifies the ID of a computer association.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SearchByIdMandatory
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SourceComputer

Specifies the name of a source computer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SourceName

Parameter sets

SearchByName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

IResultObject

IResultObject