Remove-CMComputerAssociation

Remove-CMComputerAssociation

Deletes a computer association from Configuration Manager.

構文

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

詳細説明

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.

パラメーター

-DestinationComputer<String>

Specifies the name of a destination computer.

エイリアス

RestoreName

必須?

true

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-Force

Performs the action without a confirmation message.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-InputObject<IResultObject>

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

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-MigrationId<String>

Specifies the ID of a computer association.

エイリアス

なし

必須?

true

位置は?

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

関連トピック

Get-CMComputerAssociation

New-CMComputerAssociation

Set-CMComputerAssociation