header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Using DPM Snapin from C# Never Exits
Last Post 17 Jul 2009 02:45 PM by woan. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
woanUser is Offline
New Member
New Member
Posts:3
Avatar

--
17 Jul 2009 09:51 AM
    A console app with the following code never exits... RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create(); PSSnapInException error; runspaceConfiguration.AddPSSnapIn("Microsoft.DataProtectionManager.PowerShell", out error); using (var runspaceInvoke = new RunspaceInvoke(runspaceConfiguration)) { Collection results = runspaceInvoke.Invoke("Get-ProtectionGroup -DPMServerName " + args[0]); }
    woanUser is Offline
    New Member
    New Member
    Posts:3
    Avatar

    --
    17 Jul 2009 02:45 PM
    Answered my own question, you have to call Disconnect-DPMServer before exitting powershell. Documented in the init script provided \Program Files\Microsoft DPM\DPM\bin\DpmCliInitScript.ps1
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer