Const PktPrivacy = 6
rem Const wbemAuthenticationLevelPkt = 6
Set Locator = CreateObject("WbemScripting.SWbemLocator")
rem
rem Credentials must only be specified when Microsoft Identity Integration Server is on remote system.
rem
rem Locator.Security_.AuthenticationLevel = wbemAuthenticationLevelPkt
rem Set Service = Locator.ConnectServer("MyServer", "root/MicrosoftIdentityIntegrationServer")
rem Set Service = Locator.ConnectServer("MyServer", "root/MicrosoftIdentityIntegrationServer", "Domain\Me", "MyPassword")
rem
Set Service = GetObject("winmgmts:{authenticationLevel=PktPrivacy}!root/MicrosoftIdentityIntegrationServer")
Set MASet = Service.ExecQuery("select * from MIIS_ManagementAgent where Guid = '{F294338F-86F2-41A7-98FF-E107A6477CDD}'")
for each MA in MASet
WScript.Echo "Running " + MA.name + ".Execute(""Active Directory Connector Full Cycle"")..."
WScript.Echo "Run completed with result: " + MA.Execute("Active Directory Connector Full Cycle")
next |