Using the VMM Cmdlets
Updated: January 7, 2010
Applies To: Virtual Machine Manager 2008, Virtual Machine Manager 2008 R2, Virtual Machine Manager 2008 R2 SP1
You can use the standard Windows PowerShell cmdlets together with the cmdlets that are provided by System Center Virtual Machine Manager (VMM) for interactive system administration and for scripting administrative tasks. Standard Windows PowerShell cmdlets and VMM cmdlets are available on any computer on which the VMM Administrator Console is installed.
To use the VMM cmdlets, you must start the Windows PowerShell – Virtual Machine Manager command shell or Windows PowerShell. If you use Windows PowerShell, you have to add the VMM snap-in. The following methods outline each of these options. Additionally, you can open multiple instances of either command shell at the same time. For example, you could read Help topic examples in one window and run the examples in another window.
To use VMM cmdlets in the VMM command shell
On a VMM server on which the VMM Administrator Console is installed, click Start, click All Programs, click Microsoft System Center, click Virtual Machine Manager 2008, and then click Windows PowerShell – Virtual Machine Manager.
Confirm that you are in the VMM environment by typing the following command at the command line:
A Help topic about the Get-VMMServer VMM cmdlet should be displayed.
To use VMM cmdlets in Windows PowerShell
On a VMM server on which the VMM Administrator Console is installed, click Start, click All Programs, click Windows PowerShell 1.0, and then click Windows PowerShell.
In Windows PowerShell, type the following command:
At the command prompt, type the following command to confirm that the Virtual Machine Manager snap-in was added:
If the VMM snap-in was successfully added, Microsoft.SystemCenter.VirtualMachineManager appears in the list of snap-ins.