Remove-SCVMHostCluster

Remove-SCVMHostCluster

Removes a host cluster object from VMM.

構文

Parameter Set: NormalRemoval
Remove-SCVMHostCluster [-VMHostCluster] <HostCluster> [-Credential <VMMCredential> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ForceRemoval
Remove-SCVMHostCluster [-VMHostCluster] <HostCluster> -Force [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Remove-SCVMHostCluster cmdlet removes one or more host cluster objects from Virtual Machine Manager (VMM).

Remove-SCVMHostCluster does not destroy the cluster. To uncluster a host cluster by using VMM, use the Uninstall-SCVMHostCluster cmdlet.

パラメーター

-Credential<VMMCredential>

Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task.

For more information about the PSCredential object, type Get-Help Get-Credential. For more information about Run As accounts, type Get-Help New-SCRunAsAccount.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-Force

Forces the operation to complete.

For example:

- Remove-SCSCVMHost -Force

Forces the removal of a host object from the VMM database.

- Stop-SCVirtualMachine -Force

Stops a virtual machine.

エイリアス

none

必須?

true

位置は?

named

既定値

none

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

false

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

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-VMHostCluster<HostCluster>

Specifies a VMM host cluster object.

エイリアス

none

必須?

true

位置は?

1

既定値

none

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

True (ByValue)

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

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 a specific host cluster from VMM

The first command gets the Run As account object named RunAsAccount01, and then stores the object in the $Credential variable. The Run As account used for this operation must be a domain account with administrator rights on all of the nodes of the failover cluster that you want to remove.

The second command gets the failover cluster object named VMHostCluster01, and then stores the object in the $VMHostCluster variable.

The last command removes the VMHostCluster01 cluster object from the VMM database and stops managing that host cluster, after prompting you for confirmation. It does not modify the host cluster settings or its existing virtual machines. As this command is processed, $Credential provides the stored Run As account to Remove-SCVMHostCluster.

PS C:\> $Credential = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> $Cluster = Get-SCVMHostCluster -Name "VMHostCluster01.Contoso.com"
PS C:\> Remove-SCVMHostCluster -VMHostCluster $Cluster -Credential $Credential -Confirm

Example 2: Remove all host clusters from VMM

The first command gets the Run As account object named RunAsAccount01, and then stores the object in the $Credential variable. The Run As account used for this operation must be a domain account with administrator rights on all of the nodes of the failover cluster that you want to remove.

The second command gets all host cluster objects, and passes the objects to the Remove-SCVMHostCluster cmdlet by using the pipeline operator. That cmdlet removes each host cluster object from Virtual Machine Manager and stops managing the corresponding host cluster, after prompting the user for confirmation. The command does not modify the host cluster settings or its existing virtual machines. As this command is processed, $Credential provides the stored Run As account to Remove-SCVMHostCluster.

PS C:\> $Credential = Get-SCRunAsAccount -Name "RunAsAccount01"
PS C:\> Get-SCVMHostCluster | Remove-SCVMHostCluster -Credential $Credential -Confirm

関連トピック

Add-SCVMHostCluster

Find-SCCluster

Get-SCVMHostCluster

Install-SCVMHostCluster

Move-SCVMHostCluster

Read-SCVMHostCluster

Set-SCVMHostCluster

Test-SCVMHostCluster

Uninstall-SCVMHostCluster

Restart-SCJob

Get-SCRunAsAccount