Creating Virtual Machine Hosts

Creates a Virtual Machine Host object in the current or in the specified context 


Examples:


Hint: The execution of these examples requires a connected PowerShell drive.


The following command create the new VM-Host object "ESX21" in the context "Virtual Environments\ESXServers":


New-EmdbVirtualHost "emdb:\rootDSE\Managed Virtual Environments\ESXServers\ESX21" -VirtualizationPlatform ESX


Valid option values for the parameter VirtualizationPlatform are: ESX, Hyper-V and Xen.


This snippet creates the VM-Host "HVSRV23" in the current context and specifies, that this VM-Host is running on the Computer "SRV23" already existing in the ODS.


$MyVMHostComputer = Get-EmdbComputer "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Servers\SRV23"

Cd "emdb:\rootDSE\Managed Virtual Environments\Hyper-V Servers"

New-EmdbVirtualHost "HVSRV23" -VirtualizationPlatform "Hyper-V" -RunningOn $MyVMHostComputer