|
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")
'---------------------------------------------------------------------------------------------------------------------------------
'Robin Full Import StageOnly
rem
Set Service01 = GetObject("winmgmts:{authenticationLevel=PktPrivacy}!root/MicrosoftIdentityIntegrationServer")
Set MASet01 = Service01.ExecQuery("select * from MIIS_ManagementAgent where Guid = '{F03AF5A1-547B-46B4-8EA0-62B8E3D911A3}'")
for each MA01 in MASet01
WScript.Echo "Running " + MA01.name + ".Execute(""Full Import (Stage Only)"")..."
WScript.Echo "Run completed with result: " + MA01.Execute("Full Import (Stage Only)")
WScript.Echo "Running " + MA01.name + ".Execute(""Full Synchronization"")..."
WScript.Echo "Run completed with result: " + MA01.Execute("Full Synchronization")
WScript.Echo "Running " + MA01.name + ".Execute(""Export"")..."
WScript.Echo "Run completed with result: " + MA01.Execute("Export")
WScript.Echo "Running " + MA01.name + ".Execute(""Full Import (Stage Only)"")..."
WScript.Echo "Run completed with result: " + MA01.Execute("Full Import (Stage Only)")
next
'---------------------------------------------------------------------------------------------------------------------------------
'Contoso Full Import StageOnly
rem
Set Service02 = GetObject("winmgmts:{authenticationLevel=PktPrivacy}!root/MicrosoftIdentityIntegrationServer")
Set MASet02 = Service02.ExecQuery("select * from MIIS_ManagementAgent where Guid = '{CFF2D38F-B095-46CE-A848-E3D3CCBA89FA}'")
for each MA02 in MASet02
WScript.Echo "Running " + MA02.name + ".Execute(""Full Import (Stage Only)"")..."
WScript.Echo "Run completed with result: " + MA02.Execute("Full Import (Stage Only)")
WScript.Echo "Running " + MA02.name + ".Execute(""Full Synchronization"")..."
WScript.Echo "Run completed with result: " + MA02.Execute("Full Synchronization")
WScript.Echo "Running " + MA02.name + ".Execute(""Export"")..."
WScript.Echo "Run completed with result: " + MA02.Execute("Export")
WScript.Echo "Running " + MA02.name + ".Execute(""Full Import (Stage Only)"")..."
WScript.Echo "Run completed with result: " + MA02.Execute("Full Import (Stage Only)")
next
Sub ErrorHandler (ErrorMessage)
WScript.Echo ErrorMessage
WScript.Quit(1)
End Sub |
|
|