tags:

views:

15

answers:

0

Hi Everyone,

I am monitoring AD objects with following WQL event query. This code is catching normal changes but failed to catch bulk changes. I am updating AD objects using powershell command and this code is not receiving all committed changes.

ConnectionOptions connection = new ConnectionOptions ();

connection . Username = "Administrator" ; connection . Password = "p@$$w0rd" ; connection . Authority = "ntlmdomain:testDomain" ; ManagementScope scope = new ManagementScope ( "\\vmtestdomaindc1.testdomain.com\root\directory\LDAP" , connection ); scope . Connect (); WqlEventQuery query = new WqlEventQuery ( "SELECT * FROM __InstanceOperationEvent Within 10 WHERE " + "TargetInstance ISA ' ds_group '" ) ; watcher = new ManagementEventWatcher ( scope , query ); watcher. EventArrived += new EventArrivedEventHandler (watcher_EventArrived); watcher. Start ();

Can someone please help me to catch all the events from AD?

Thank You Faisal Iqbal