Jaa


SCVMM PowerShell Commands Cheat Sheet

PowerShell icon

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:\temp\SCVMM_Commands.txt

PowerShell

 

CUBENOTE SCVMM 2008 R2 PowerShell Commands

PowerShell Resources

If you’re a complete newb to PowerShell, I’ve got that covered too. Links below provide the best ramp and reference material online. There are great books too. Check some of the Microsoft Press books in particular.

TechNet Script Center

Hey, Scripting Guy! BLOG

SCVMM PowerShell Resources

SCVMM specific URLs with plenty of examples ready to run now.

SCVMM Scripting on TechNet – EXAMPLES!

Virtual Machine Manager 2008 R2 Scripting Guide (Word Doc)

System Center Virtual Machine Manager 2008 R2 Cmdlet Reference (Word Doc)

Troubleshooting VMM Cmdlet Issues

SCVMM CubeNote Downloads

CUBENOTE SCVMM 2008 R2 PowerShell Commands      CUBENOTE SCVMM 2008 R2 PowerShell Commands      CUBENOTE SCVMM 2008 R2 PowerShell Commands

 

 

...

 jonjor

Comments

  • Anonymous
    January 01, 2003
    thank you

  • Anonymous
    January 01, 2003
    Thanks Tobias. Good information.

  • Anonymous
    October 06, 2010
    The comment has been removed

  • Anonymous
    May 16, 2013
    FYI, your command: Get-Command -PSSnapIn "microsoft.systemcenter.virtualmachinemanager" | write-outfile c:tempSCVMM_Commands.txt should be: Get-Command -PSSnapIn "microsoft.systemcenter.virtualmachinemanager" | out-file c:tempSCVMM_Commands.txt HTH.