SCVMM PowerShell Commands Cheat Sheet

PowerShell. You keep meaning to learn it. You just need a push. Maybe a CubeNote (Cheat Sheet) would help.

Think about this… every single command you perform in the SCVMM Admin Console can be performed in PowerShell. There isn’t a single thing in the Admin Console that is not available by interactive command or script. In fact, there are many things that can be done only in PowerShell. Further, when scripts (.ps1 files) are saved to the Library they are available to run immediately by right clicking them and selecting ‘Run Script.’ I published a script last year that determines which network settings on which Host are causing your virtual machines to show up as ‘Unsupported Cluster Configuration.’ Cool huh? That article is here. Below I’ve right clicked the script to show other available options.

image 

 So what’s a CubeNote?

Basically, a quick reference of all SCVMM specific commands. Sure, you could type the line below, but then you’d have to sort it all out yourself. I’ve formatted the commands to fit on a single sheet, organized by function. I glance at it all the time to find the right command. The sheet is organized by command type, so find the action (verb) you are interested in, then locate the object you want to act on (noun). Possible actions are: Add, Get, Move, New, Refresh, Set, Update, and various others.

Tip: Make sure you open a PowerShell console that has the SCVMM cmdlets already loaded by clicking the PowerShell button shown below. Open the Admin Console on the SCVMM Server itself to save yourself some headache. (PowerShell guru’s do what you like…)

Get-Command -PSSnapIn “microsoft.systemcenter.virtualmachinemanager” | write-outfile c:tempSCVMM_Commands.txt

PowerShell

Download the CubeNotes here:

MS Word version

PDF version

With great thansk to Jonathon from MS Blogs.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.