Yesterday, Microsoft have releasedDownload the SCVMM whitepaper 149 pages of scripting powershell sugary goodness, called the Virtual Machine Manager Scripting Guide (792 Kb in *.doc format)

The guide explains how to create PowerShell scripts that execute Virtual Machine Manger 2007 commands, and provides over a dozen (16 to be exact) sample scripts:

    AddVSServerAsHost
    AutomateNewVMCreation   
    BackupLocalVMM   
    BackupRemoteVMM
    CreateSelfServicePolicy_AccessVMs
    CreateSelfServicePolicy _CreateManageStoreVMs
    CreateSelfServicePolicy_CreateManageVMs
    CreateSelfServicePolicy_ManageVMs
    DiscoverVMMComputers
    EnableVMRC
    InstallVMAdditions
    NeedVMAdditions
    RestoreLocalVMM
    RestoreRemoteVMM
    TrackJobStatus
    UpgradeAgents