轉自《https://www.pbnet.ro/?p=834》app
OK, so you notice that your AADSync scheduled job runs but no sync occurs between your on-prem AD and Azure AD.ide
Also, when manually running D:\Program Files\Microsoft Azure AD Sync\Bin\DirectorySyncClientCmd.exe nothing happens on the sync side.spa
When you verify your server’s application logs, you notice:server
Failed while Purging Run History
Invalid namespace
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementScope.InitializeGuts(Object o)
at System.Management.ManagementScope.Initialize()
at System.Management.ManagementObjectSearcher.Initialize()
at System.Management.ManagementObjectSearcher.Get()
at Microsoft.Azure.ActiveDirectory.Synchronization.DirectorySyncClientCmd.Program.PurgeRunHistory(TimeSpan purgeInterval)
at Microsoft.Azure.ActiveDirectory.Synchronization.Framework.ActionExecutor.Execute(Action action, String description)
at Microsoft.Azure.ActiveDirectory.Synchronization.DirectorySyncClientCmd.Program.Main(String[] args)ip
Root causerem
This happens when the WMI object had unregistered itself which might be caused by another tool installed or uninstalled at the time when the problem started to occur.get
Resolution:
To resolve the issue, run the commands below:
mofcomp 「D:\Program Files\Microsoft Azure AD Sync\Bin\mmswmi.mof」
regsvr32 /s 「D:\Program Files\Microsoft Azure AD Sync\Bin\mmswmi.dll」it
net stop winmgmt /yio
net start winmgmt
net start 「IP Helper」
net start 「User Access Logging Service」
net start 「Microsoft Azure AD Sync」sed
D:\Program Files\Microsoft Azure AD Sync\Bin\DirectorySyncClientCmd.exe」
Now your AdSync scheduled task should run successfully (you can check that using MIISClient).