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.
From serverfault
Simon Holman
-
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\binFrom sysadmin1138
0 comments:
Post a Comment