0

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.

Simon
  • 1
  • 1

1 Answers1

1

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.

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
  • 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 – Simon Aug 27 '10 at 23:43