Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 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.

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.