Saturday, January 29, 2011

Scheduling a powershell script for DPM 2010

I am currently setting up DPM 2010 with my HyperV cluster and have found the following powershell script to automatically add new Cluster VM's

http://blogs.technet.com/b/dpm/archive/2009/12/03/hyper-v-protection-with-dpm-2010-beta-how-to-automatically-protect-new-virtual-machines.aspx

I can get the script to work perfectly from the DPM Management Shell. I am struggling to work out the exact syntax to be able to run it as a batch file that I can run each night using Task Manager. Hoping someone can help.

  • The syntax I use to kick off POwerShell from TaskScheduler is kinda clunky, but it works:

    Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Add arguments: -nologo -command "Path To PowerShell Script"
    Start In: [Path of script]

    Works for me.

    Simon Holman : I tried this and the task runs without error but the scrip doesn't run. I had to change it a little to the following Program: same as you Arguments: -nologo -command c:\scripts\AddNewCLusteredVM.ps1 hypervcluster.domain "HyperV Cluster" Start In: C:\Program Files\Microsoft DPM\DPM\bin

0 comments:

Post a Comment