Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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


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.