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

Remove-CMComputerAssociation

Updated: February 7, 2014

Applies To: System Center 2012 R2 Configuration Manager

Remove-CMComputerAssociation

Deletes a computer association from Configuration Manager.

Syntax

Parameter Set: SearchByNameMandatory
Remove-CMComputerAssociation -DestinationComputer <String> -SourceComputer <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByIdMandatory
Remove-CMComputerAssociation -MigrationId <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Remove-CMComputerAssociation -InputObject <IResultObject> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Remove-CMComputerAssociation cmdlet deletes a computer association from Microsoft System Center 2012 Configuration Manager. You can specify the association to remove by specifying both computers in the association or by specifying the association ID, or you can use the Get-CMComputerAssociation cmdlet to get an association to remove.

Parameters

-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

-Force

Performs the action without a confirmation message.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<IResultObject>

Specifies a computer association object. To obtain a computer association object, use the Get-CMComputerAssociation cmdlet.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MigrationId<String>

Specifies the ID of a computer association.


Aliases

none

Required?

true

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: Remove an association by using computer names

This command removes the computer association between the computers named West155 and West073.


PS C:\> Remove-CMComputerAssociation -DestinationComputer "West155" -SourceComputer "West073"

Example 2: Remove an association by using an ID

This command removes the computer association that has the ID MID1207. This command uses the Force parameter, so the cmdlet does not prompt you for confirmation before it removes the association.


PS C:\> Remove-CMComputerAssociation -MigrationId "MID1207" -Force

Example 3: Remove an association by using a variable

The first command gets the computer association that has the ID MID1207, and saves it in the $CMCA variable.

The second command removes the association saved in the $CMCA variable. This command uses the Force parameter, so the cmdlet does not prompt you for confirmation before it removes the association.


PS C:\> $CMCA = Get-CMComputerAssociation -MigrationId "MID1207"
PS C:\> Remove-CMComputerAssociation -InputObject $CMCA -Force

Related topics

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