Enable-SCVMHost

Restores a virtual machine host in maintenance mode to full service.

Description

The Enable-SCVMHost cmdlet restores a virtual machine host in maintenance mode to full service as a host managed by System Center Virtual Machine Manager (VMM). 

Enable-SCVMHost supports any type of host managed by VMM, including Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.

When you use Enable-SCVMHost to restore a host to full service, VMM automatically restores some capabilities but requires you to perform certain actions manually.

VMM automatically re-enables the following items:

- Creation of virtual machines on the host.
- Migration of virtual machines to the host.
- Host ratings for the host.

VMM also automatically refreshes the host to its current state.

You must manually restart any virtual machines that are in a saved state on a standalone host. For hosts that are a node in a host cluster, you must manually restart the virtual machines and manually move any migrated virtual machines back to this node that you migrated to another node when you placed the host into maintenance mode.

For more information about Enable-SCVMHost, type: "Get-Help Enable-SCVMHost -online".

Parameters

VMHost

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts. 

For more information about each type of host, type: "Get-Help Add-SCVMHost -detailed". See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 
A host that you put into temporary maintenance mode is different from a host that you designate as a maintenance host. A maintenance host is a host that you dedicate for virtual machine maintenance tasks, such as the following tasks:

  - Patching stored virtual machines and templates.
  - Staging scripted virtual machine creation before you move the virtual 
	machines into your production environment.

Examples

1: Restores the specified host to service.
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01"
PS C:\> Enable-SCVMHost -VMHost $VMHost
The first command gets host object named VMHost01 and stores the object in the $VMHost variable.

The second unblocks virtual machine creation operations on the host stored in $VMHost, and includes the host in host ratings during placement. It also takes the host status out of "In Maintenance Mode" so that the next host refresh job will set the host status to its current state.

See Also