Microsoft IDM



Identity Management

the Microsoft way

Tuesday, May 01, 2007



Running more than one Lotus Notes Management Agent at a time

When scheduling runs with multiple Lotus Notes Management Agents in MIIS, you need to be careful because you can't run more then one Notes MA at a time.When you try to run the second ma, it will fail throwing an error.This can be a pretty annoying problem when you have to run multiple Notes MA's on a different scheduling interval.I came up with a quick way to check if there were any other Notes MA's running using WMI and VB.netThis way instead of the second Notes MA failing, it would just wait until the other Notes MA was finished.Here's the code snippet:Imports Microsoft.win32Imports System.XmlImports System.IO.DirectoryImports System.IOModule NotesMAStatus Sub Main(ByVal args() As String) Dim Service = GetObject("winmgmts:root\MicrosoftIdentityIntegrationServer") Dim ManagementAgents = Service.ExecQuery("select * from MIIS_ManagementAgent") Dim MA Dim maName Dim MARunning As Boolean = True Do While MARunning = True MARunning = False For Each MA In ManagementAgents If MA.Type.ToString.ToLower = "lotus notes" Then 'Console.WriteLine("") 'Console.WriteLine(MA.Name) 'Console.WriteLine(MA.Guid) Dim ManagementAgent = Service.Get("MIIS_ManagementAgent.Name='" + MA.Name + "'") Dim test = ManagementAgent.RunStatus(MA.Guid) 'Console.WriteLine(test) Console.WriteLine("") If test = "in-progress" Then MARunning = True Console.WriteLine("") Console.WriteLine(MA.Name + " is Running") Console.WriteLine("") End If End If Next If MARunning = True Then System.Threading.Thread.Sleep() End If Loop End SubEnd Module

Posted by Joe Stepongzi

at 5/01/2007 10:06:00 AM

0 comments









Newer Posts

Older Posts

Home

Subscribe to: Posts (Atom)





MVP - Identity LifeCycle Manager (2007)(2008)(2009)





About Me









My Frequent Access Links

Almero Steyn's puttyq Brad Turner's 1dent1ty cHa0s Microsoft Identity & Access Solutions MIIS Web Forums





Blog Archive



&;&;

2009 (18)



&;&;

July (4)

Need a couple more days for Testing Make that Sunday Night!!!! MVP for 2009!!! New Version of SQL xMA due out Saturday Night!!!!



&;&;

June (1)

Delta Generator almost done!!!!



&;&;

May (4)

Big Shout out to the Ensynch family!!!! SQL xMA Delta Generator and Exports due out shortl... ILM "X" FrameWork SQL xMA 1.0 has been released! Need one more week for the ILM "X" FrameWork SQL x...



&;&;

April (9)

ILM "X" Framework has been delayed til May 1st Sharepoint Service Pack 2 is going to be Shipping ... Oracle buys Sun??? ILM "X" FrameWork Update ILM Changing to Forefront Identity Manager 2010???... Vote on the delay of ILM "2" Congratulations!!! to the newest ILM MVP&;s!!!! ILM Extensibility Framework Going to start blogging big time!!!!

&;&; 2007 (7)



&;&;

September (2)

ILM 2007 Workshop in Boston Oct. 2&3 Presenting at DEC2008 in Chicago



&;&;

July (1)

Guess Who&;s a Microsoft MVP?



&;&;

June (1)

New Extensible Management Agent Documents added to...

&;&; May (1)

Running more than one Lotus Notes Management Agent...



&;&;

April (1)

Dual Authoritative Data Sources



&;&;

February (1)

1st Post -- Let&;s get this started