none
AddNewStandAloneVM.ps1 scripting problem RRS feed

  • Question

  • Hello,

    I am not that familiar with Powershell, however this script wrked fine in 2010 before we upgraded to DPM 2012 recently.  We constantly add new VMs to many hosts on a daily basis and so we run this script via a batch file nightly.  The batch file contains multiple commands as so:

    powershell.exe -command ". c:\AddNewStandAloneVM.ps1 host01.sopheon.com "Host01""

    powershell.exe -command ". c:\AddNewStandAloneVM.ps1 host02.sopheon.com "Host02""

    After the upgrade to 2012 the command doesn't work, and I have found very little documentation in my internet searches.  As I said I'm sure this can be resolved by writing a Powershell script, but I do not know how to do this.  This seems like it would be a common problem among Hyper-V shops and I'm shocked that Microsoft didn't include the ability to do this within the GUI and we're forced to script it and run as a scheduled task.

    The only way I can get this to work is if I launch the DPM Management Shell manually and then run each command by hand which is not a viable solution.  Can anyone provide guidance?  Thank you.

    Jeff

    Wednesday, January 9, 2013 4:30 PM