PowerShell Logo Small

Add-ClusterVirtualMachineRole



This is the built-in help made by Microsoft for the command 'Add-ClusterVirtualMachineRole', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates a clustered virtual machine, that is, a virtual machine that can be failed over if necessary to a different server in the failover cluster.

SYNTAX


Add-ClusterVirtualMachineRole [[-VMName] <String>] [-Cluster <String>] [-InputObject <PSObject>] [-Name <String>] [-VirtualMachine <String>] [-VMId <Guid>]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Add-ClusterVirtualMachineRole cmdlet creates a clustered virtual machine, that is, a virtual machine that can be failed over if necessary to a different server in the
failover cluster.


By creating clustered virtual machines, you can consolidate multiple servers on one physical server without causing that server to become a single point of failure. Instead,
if that server, or cluster node, fails or requires scheduled maintenance, then another node begins to run the virtual machines instead through a process known as failover.
The virtual hard disk (VHD) file for the clustered virtual machine must be on the clustered disk used by that virtual machine.


Note: This cmdlet cannot be run remotely without Credential Security Service Provider (CredSSP) authentication on the server computer.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=321020
Move-ClusterVirtualMachineRole
Update-ClusterVirtualMachineConfiguration
Get-VM

REMARKS

<

Examples


Example 1

PS C:\>Add-ClusterVirtualMachineRole -VirtualMachine VM1
Name OwnerNode State
---- --------- -----
Virtual Machine node1 Offline



This example configures VM1 as a clustered virtual machine, and assigns a default name.




Example 2

PS C:\>Add-ClusterVirtualMachineRole -VirtualMachine VM1 -Name "MainServer1"
Name OwnerNode State
---- --------- -----
MainServer1 node1 Offline



This example configures VM1 as a clustered virtual machine, and assigns the name MainServer1.




Example 3

PS C:\>Get-VM –Name *print* | Add-ClusterVirtualMachineRole
Report file location: C:\Windows\cluster\Reports\Highly Available Virtual Machine 0ce88dce-eb6b-4c17-a512-d13bdbe5fcba on2011.11.28 At 15.37.33.mht

Name OwnerNode State
---- --------- -----
print-VM1 node1 Online



This example queries for virtual machines matching the wildcard characters *print* and configures them as clustered virtual machines.