DPM 2012 - Add-PSSnapin equivalent RRS feed

  • Question

  • Hi

    I've been testing some of my DPM2010 scripts and have found that the section which adds the PowerShell snap-in fails.

    Does anyone know if there is a change to this in DPM 2012?

    if((Get-PSSnapIn -Name "Microsoft.DataProtectionManager.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
      Add-PSSnapIn "Microsoft.DataProtectionManager.PowerShell"


    Is there an import-module "DPM" option?



    New SCOM 2012 Blog! -
    View OpsMgr tips and tricks at

    Wednesday, February 29, 2012 6:02 PM


All replies

  • OK - found it!


    New SCOM 2012 Blog! -
    View OpsMgr tips and tricks at

    Thursday, March 1, 2012 9:25 AM
  • Doesn't work for me..

    My solution was to copy this part at the beginning of my .ps1 :

    # Import the DPM PowerShell module
    $installPath = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Setup" "UIInstallPath").UIInstallPath
    $dpmModuleFullPath = $installPath + "Modules\DataProtectionManager\DataProtectionManager.psd1"
    Import-Module $dpmModuleFullPath

    Friday, May 11, 2012 11:33 AM
  • Hi,

    I've found I need

    for 2010

    Add-PSSnapin -name Microsoft.DataProtectionManager.PowerShell

    for 2012

    Import-Module DataProtectionManager


    Monday, May 28, 2012 12:56 PM
  • I ran into this issue after upgrading the server to 2012,  we had already install powershell version 3 on the server and after the in place upgrade to 2012 the modules would not work.

    Best solution I found was to launch powershell version 2 on 2012, if you open up powershell v3 type in the command "powershell.exe -version2".  After that I imported the modules I needed and was able to fix an issue I had with my DPM server.

    • Proposed as answer by Jmartocchio82 Thursday, May 23, 2013 12:23 PM
    Thursday, May 23, 2013 12:20 PM