Scripts

How to create a Script-based 2-State Monitor

With more than 400 downloads in its original release, this tutorial (updated Sept 2009) provides a detailed walkthrough on how to create a 2-State Monitor using VBScript with the ‘Timed Script Two State Monitor’ in Operations Manager 2007 RTM / SP1 / R2.

OpsMgr Group Maintenance Mode Script with Prompt for Input

Group maintenance mode script for OpsMgr 2007 that prompts user for input. Intended to be used as a desktop shortcut for easy ad-hoc maintenance mode. Instructions for use: http://www.systemcenterforum.org/news/opsmgr-powershell-tip-desktop-shortcut-for-enabling-group-maintenance-mode Based on “One more group maintenance mode script” from Boris Y at http://blogs.msdn.com/boris_yanushpolsky/attachment/8034871.ashx

Cloning Hyper-V VMs in Powershell Using (Import/Export)

by Taylor Brown, this script retrieves the Msvm_VirtualSystemManagmentService class and the MasterVM’s Msvm_ComputerSystem. It then loops 10 times, first changing the name of the VM and then exporting the VM and finally re-importing the VM. After it completes the 10 interactions it restores the name of original name of the MasterVM.