The Remove-HyperVClusterVirtualMachines
cmdlet lets you remove specific virtual machines (VMs) of a Hyper-V cluster from protection of a Core.
Usage
The usage for the command is as follows:
Remove-HyperVClusterVirtualMachines -core [host name] -user [user name] -password [password] -repository [name] -protectedserver [name | IP address] -virtualmachines [virtual machines collection | all]
Command Options
The following table describes the options available for the Remove-HyperVClusterVirtualMachines
command:
Option | Description |
---|---|
-? |
Display this help message. |
-core |
Optional. Remote Core host machine IP address (with an optional port number). By default the connection is made to the Core installed on the local machine. |
-user |
Optional. User name for the remote Core host machine. If you specify a user name, you also have to provide a password.
If none are provided, then the logged-on user's credentials will be used. |
-password |
Optional. Password to the remote Core host machine. If you specify a password, you also have to provide a log on.
If none are provided, then the logged-on user's credentials will be used. |
-protectedserver |
Use this option to protect virtual machines. |
-virtualmachines |
A list of the virtual machines that you want to protect, each separated by a comma. The name of the VM must be enclosed in double quotes. |
-deleterecoverypoints |
Optional. Include this option if you want to delete all of the recovery points for this VM. |
Example:
Remove specific virtual machines of a Hyper-V cluster from protection by the Core and delete its recovery points:
>Remove-HyperVClusterVirtualMachines -protectedserver hvcluster -virtualmachines "Win8x64-gen1", "Win2012x64-gen2" -deleterecoverypoints