You use Microsoft System Center Virtual Machine Manager (VMM) 2008 R2 to create and
manage virtual machines (VMs). You attempt to create the first VM on a Hyper-V host by
using Windows PowerShell. You receive an error message stating that the New-VM
PowerShell cmdlet is not recognized. You need to be able to create VMs by using
PowerShell. What should you do?
A.
Install the VMM Self-Service Portal.
B.
Enable the Windows PowerShell Integrated Scripting Environment feature.
C.
In PowerShell, run the Add-PSSnapin Microsoft.SystemCenter.VirtualMachineManager
cmdlet.
D.
Run the Create-VM -Name “VM01” -VirtualHardDisk $VHD -VMHost $VMHost -Path
“C:\MyVMs”PowerShell cmdlet.
Explanation:
When the Windows PowerShell command shell opens:Add the Virtual Machine Manager snap-in so that you can load the Virtual Machine Manager
cmdlets by typing the following command at the command prompt:
Add-PSSnapin Microsoft.SystemCenter.VirtualMachineManager
View a list of all Windows PowerShell snap-ins by typing the following command at the
command prompt:
Get-PSSnapin
Confirm that the Virtual Machine Manager snap-in has loaded by typing the following
command at the command prompt:
Get-Help New-VM
If a help topic about the Virtual Machine Manager cmdlet New-VM is displayed, the Virtual
Machine Manager snap-in is loaded. (You can substitute any Virtual Machine Manager
cmdlet for New-VM.)
Confirm that you can view a list of all Virtual Machine Manager cmdlets by typing the
following command (all on one line) at the command prompt:
Get-Command -PSSnapin Microsoft.SystemCenter.VirtualMachineManager