<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2523 " id="quads-ad2523" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>

<h2 class="wp-block-heading"><strong>Symptoms:</strong> </h2>



<p>You may notice that when you try to run the Sync command DirectorySyncClientCmd it doesn’t do anything and just closes right away.</p>
<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2525 " id="quads-ad2525" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>

<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2526 " id="quads-ad2526" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>

<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2524 " id="quads-ad2524" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>




<p>If you open your Event viewer you may notice that you are getting the following event</p>



<figure class="wp-block-image"><a href="http://www.moh10ly.website/wp-content/uploads/2016/03/image-1.png"><img src="http://www.moh10ly.website/wp-content/uploads/2016/03/image_thumb-1.png" alt="image"/></a> 

<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2529 " id="quads-ad2529" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>
 
</figure>



<h2 class="wp-block-heading">Failed while Purging Run History</h2>



<h6 class="wp-block-heading">Invalid namespace</h6>



<h6 class="wp-block-heading">at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode) <strong>at System.Management.ManagementScope.InitializeGuts(Object o)</strong> <strong>at System.Management.ManagementScope.Initialize()</strong> <strong>at System.Management.ManagementObjectSearcher.Initialize()</strong> <strong>at System.Management.ManagementObjectSearcher.Get()</strong> <strong>at Microsoft.Azure.ActiveDirectory.Synchronization.DirectorySyncClientCmd.Program.PurgeRunHistory(TimeSpan purgeInterval)</strong> <strong>at Microsoft.Azure.ActiveDirectory.Synchronization.Framework.ActionExecutor.Execute(Action action, String description)</strong> <strong>at Microsoft.Azure.ActiveDirectory.Synchronization.DirectorySyncClientCmd.Program.Main(String[] args)</strong> </h6>



<h2 class="wp-block-heading"><strong>Cause:</strong></h2>



<p>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.</p>



<h2 class="wp-block-heading"><strong>Resolution:</strong></h2>



<p>To resolve the issue, you ‘ll have to run few command lines… each are explained below</p>



<p><strong>mofcomp “D:\Program Files\Microsoft Azure AD Sync\Bin\mmswmi.mof”</strong></p>



<p>As it shows in the command screenshot below the ‘mofcomp’ parses the MMS (FIM) wmi file and goes through the process of adding the classes ; to the WMI repository.</p>



<figure class="wp-block-image"><a href="http://www.moh10ly.website/wp-content/uploads/2016/03/image-2.png"><img src="http://www.moh10ly.website/wp-content/uploads/2016/03/image_thumb-2.png" alt="image"/></a></figure>



<p>regsvr32 /s “D:\Program Files\Microsoft Azure AD Sync\Bin\mmswmi.dll”</p>
<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2527 " id="quads-ad2527" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>




<p>Registers the WMI mmswmi.dll file to the server.</p>



<figure class="wp-block-image"><a href="http://www.moh10ly.website/wp-content/uploads/2016/03/image-3.png"><img src="http://www.moh10ly.website/wp-content/uploads/2016/03/image_thumb-3.png" alt="image"/></a></figure>



<p>net stop winmgmt /y</p>



<figure class="wp-block-image"><a href="http://www.moh10ly.website/wp-content/uploads/2016/03/image-4.png"><img src="http://www.moh10ly.website/wp-content/uploads/2016/03/image_thumb-4.png" alt="image"/></a></figure>



<p>net start winmgmt<br>net start “IP Helper”<br>net start “User Access Logging Service”<br>net start “Microsoft Azure AD Sync”</p>



<figure class="wp-block-image"><a href="http://www.moh10ly.website/wp-content/uploads/2016/03/image-5.png"><img src="http://www.moh10ly.website/wp-content/uploads/2016/03/image_thumb-5.png" alt="image"/></a></figure>



<p>D:\Program Files\Microsoft Azure AD Sync\Bin\DirectorySyncClientCmd.exe”</p>



<figure class="wp-block-image"><a href="http://www.moh10ly.website/wp-content/uploads/2016/03/clip_image001-1.png"><img src="http://www.moh10ly.website/wp-content/uploads/2016/03/clip_image001_thumb-1.png" alt="clip_image001"/></a></figure>



<figure class="wp-block-image"><a href="http://www.moh10ly.website/wp-content/uploads/2016/03/clip_image002-1.png"><img src="http://www.moh10ly.website/wp-content/uploads/2016/03/clip_image002_thumb-1.png" alt="clip_image002"/></a></figure>



<figure class="wp-block-image"><a href="http://www.moh10ly.website/wp-content/uploads/2016/03/clip_image003-1.png"><img src="http://www.moh10ly.website/wp-content/uploads/2016/03/clip_image003_thumb-1.png" alt="clip_image003"/></a></figure>



<figure class="wp-block-image"><a href="http://www.moh10ly.website/wp-content/uploads/2016/03/clip_image004-1.png"><img src="http://www.moh10ly.website/wp-content/uploads/2016/03/clip_image004_thumb-1.png" alt="clip_image004"/></a></figure>



<figure class="wp-block-image"><a href="http://www.moh10ly.website/wp-content/uploads/2016/03/image-6.png"><img src="http://www.moh10ly.website/wp-content/uploads/2016/03/image_thumb-6.png" alt="image"/></a></figure>



<p>References:</p>



<p>– ;<a href="https://social.technet.microsoft.com/Forums/en-US/cafd290d-d1a8-4d15-b4db-d79460216438/azure-ad-sync-error?forum=WindowsAzureAD">https://social.technet.microsoft.com/Forums/en-US/cafd290d-d1a8-4d15-b4db-d79460216438/azure-ad-sync-error?forum=WindowsAzureAD</a></p>
<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2530 " id="quads-ad2530" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>




<p>– ;<a href="http://blogs.technet.com/b/latam/archive/2015/06/01/erros-1603-ao-instalar-o-aadsync-microsoft-azure-active-directory-sync-services.aspx">http://blogs.technet.com/b/latam/archive/2015/06/01/erros-1603-ao-instalar-o-aadsync-microsoft-azure-active-directory-sync-services.aspx</a></p>

<!-- WP QUADS Content Ad Plugin v. 2.0.92 -->
<div class="quads-location quads-ad2531 " id="quads-ad2531" style="float:none;margin:0px 3px 3px 3px;padding:0px 0px 0px 0px;" data-lazydelay="0">

</div>


Reset and manage your Active Directory users' Passwords Active Directory is one of the most…
Finding Exchange Database hidden mailboxes. Story:Maybe you have been in this situation before, trying to…
If you're using a Proxy server in your firewall or in your network and have…
Story:I got some clients that have reported some of their users being locked out and…
Delegate Permissions This is a code that I have wrote recently to check if an…
Story: I got a request from a client who constantly gets CVs and have to…