AZURE ACTIVE DIRECTORY SYNC EVENT ID 906 FAILED WHILE PURGING RUN HISTORY INVALID NAMESPACE

Symptoms: You may notice that when you try to run the Sync command DirectorySyncClientCmd it doesn’t do anything and just closes right away.

If you open your Event viewer you may notice that you are getting the following event

image

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)

Cause:

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.

Resolution:

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

mofcomp “D:\Program Files\Microsoft Azure AD Sync\Bin\mmswmi.mof”

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.

image

regsvr32 /s “D:\Program Files\Microsoft Azure AD Sync\Bin\mmswmi.dll”

Registers the WMI mmswmi.dll file to the server.

image

net stop winmgmt /y

image

net start winmgmt
net start “IP Helper”
net start “User Access Logging Service”
net start “Microsoft Azure AD Sync”

image

D:\Program Files\Microsoft Azure AD Sync\Bin\DirectorySyncClientCmd.exe”

clip_image001

clip_image002

clip_image003

clip_image004

image

References:

https://social.technet.microsoft.com/Forums/en-US/cafd290d-d1a8-4d15-b4db-d79460216438/azure-ad-sync-error?forum=WindowsAzureAD

http://blogs.technet.com/b/latam/archive/2015/06/01/erros-1603-ao-instalar-o-aadsync-microsoft-azure-active-directory-sync-services.aspx

FreePBX (Asterisk Now) With Skype for Business Integration

In my earliest article about Lync with Asterisk Now (FreePBX) I have written step by step guide on how to integrate Lync and FreePBX but since Skype for Business came out and the new version of Free PBX 13.0.84 I thought it would be good idea to try the integration between both of them ..

In Skype for Business server I am using the latest CU version 6.0.9319.0.

image

The steps are very similar to the original article except with some UI changes.. 

In the following article I will be only showing the main steps which I have taken to integrate Skype for Business with FreePBX and will show the steps that have been done on the FreePBX side only not on the Skype for Business server as it is very similar to the original article.

Integration of AsteriskNow (FreePBX 13.0.84) and Skype for Business Server

clip_image001[4]

Creating Trunk for Skype for Business

First I will start by creating a new trunk for S4B and configure it. To configure the trunk (Skype for Business trunk for outgoing calls from Asterisk to S4B)

Click on Connectivity >>  Trunks and follow the below screenshots.

clip_image001

clip_image002

Under the SIP settings (Outgoing) tab type the following

host=10.10.124.120
transport=tcp
port=5060
insecure=very
type=friend
context=from-internal
promiscredir=yes
qualify=yes
canreinvite=yes

In the incoming tab make sure you delete everything and then submit changes

Configure the Trunk with an outbound route

clip_image003

While creating the Outbound route, this route must be associated with the Trunk that I have created earlier in the trunk sequence as in the below screenshot..

clip_image004

In my case the pattern NXXX should be enough as it’ll route the call to my S4B’s 4 extension users (5000)

clip_image005

==========================================

Click on Connectivity >>> Inbound routes

Click add inbound route

clip_image006

clip_image007

clip_image008

==========================================

Now the most important is the SIP settings

Configuring Asterisknow to accept TCP calls from S4B

From the Settings menu ->> click on Asterisk SIP settings then choose Chan SIP settings and do the same configuration like the one below

clip_image009

Scroll further down to the “Advanced General Settings”

Enter the two “Other SIP settings” fields below and submit changes.

clip_image010

clip_image011

clip_image012

Conference with 2 Extensions on Asterisk now with s4B

clip_image013

I can call from S4B to Asterisk extensions and vice versa without any issues.