Export (0) Print
Expand All


Updated: October 30, 2008

Applies To: Virtual Machine Manager 2008, Virtual Machine Manager 2008 R2, Virtual Machine Manager 2008 R2 SP1

The following script adds a host cluster to System Center Virtual Machine Manager (VMM).


# Filename:      AddHostCluster.ps1
# Description:   Adds a host cluster to VMM.

# Define the variables.
$Credential = get-credential
# The host group path in the following line is the default location. 
# To change the location, provide a different host group path.
$VMHostGroup = Get-VMHostGroup -VMMServer "VMMServer1.Contoso.com" | where {$_.Path -eq "All Hosts"}

# Add the host cluster.
Add-VMHostCluster -VMMServer "VMMServer1.Contoso.com" -Credential $Credential -Name "HostCluster.Contoso.com" -VMHostGroup $VMHostGroup -Description "" -RemoteConnectEnabled $true -Reassociate $false -RunAsynchronously -RemoteConnectPort 2179

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft