Advanced Windows PowerShell Scripting Video Training

Advanced Windows PowerShell Scripting Video Training
Advanced Windows PowerShell Scripting Video Training

Monday, April 4, 2011

How to add Virtual Machine Manager snap-in to PowerShell ISE

According to the wizards at Microsoft, you can do everything in the PowerShell that you can do in the VMM console, and more.  To open a VMM PowerShell session, click Start \ All Programs \ Microsoft System Center \ Virtual Machine Manager 2008 R2 \ Windows PowerShell – Virtual Machine Manager.  This is good if you want to work in the shell, but what if you want to script using the PowerShell ISE?  Just open up the ISE and type this command:


Add-PSSnapin Microsoft.SystemCenter.VirtualMachineManager and press Enter.
This will only work on a computer that has VMM installed on it.

No comments: