none
Pass a PS script to the DPM Shell RRS feed

  • Question

  • I have a few DPM PowerShell scripts I want to run as a scheduled task. The scripts work fine if I open the DPM command shell and run the script. The issue is that I can not find a way to open the DPM command shell in an automated way so that I can get it to run my script from a batch file. I have tried running the scripts in plain PS but they fail as they don't understand the DPM commandlets.

    I found this example but it does not work in DPM 2012 as the ps1 file it references to open the DPM shell does not exist. Replacing with the DPM 2012 command shell file does not seem to work either.

    (This is not my script, just and example from another forum) 

    C:\Windows\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\Microsoft DPM\DPM\bin\dpmshell.psc1" -command ".'C:\Program Files\Microsoft DPM\DPM\bin\Set-Quota.ps1'" -AllProtectionGroups -Operation Apply

    I need to pass a script to DPM 2012 as this example does.

    Any advice is welcome. Maybe I am going about this all wrong. Thanks.

    Tuesday, November 27, 2012 10:11 PM

Answers

All replies