Creating an AD “Connector” to Update AD when the Service Manager CMDB is Updated Using PowerShell and Workflow

Creating an AD “Connector” to Update AD when the Service Manager CMDB is Updated Using PowerShell and Workflow

  • Comments 4
  • Likes

Someone on one of our internal discussion groups this morning asked how they could update AD when a User object is updated in the Service Manager CMDB.  The scenario was that the customer knew the data in AD for people’s phone numbers was out of date.  So – they wanted to use the service desk staff to get it up to date.  Each time a user called in for service they will ask the user to verify their phone number or provide a new one.  In this case they were planning to manually run a SQL query in the CMDB to get all the new phone numbers once per day and then update them in AD (again, I presume manually). 

There are two problems with this approach:

  • Why do this manually when it can be easily automated and done in real time using a tiny bit of PowerShell in a workflow in SCSM that is triggered as soon as the property value changes?
  • The AD connector runs 1x/hour.  If you enter the new phone number in the Service Manager CMDB, within the hour it will be overwritten by the old number from AD the next time the AD connector runs.  You need to correct it in the source ASAP.

So – here’s a quick video on how to set something like this up.  This is really just a small example of what you could do with AD or any other PowerShell accessible system like Exchange, Windows Server, VMM, SCOM, SCSM, VMWare, DPM, IIS, SQL, Hyper-V, ….

Try running this full screen in HD for full effect!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Travis,  

    No one at our company seems to be able to see the video.  All we get is white space between "SQL, Hyper-V, …." and  "Try running this full screen.."

    Is there an actual video file or link in that spot?  If so, could you please provide another way to see it?


    Chuck Roy

  • @Chuck Roy -  You aren't using one of those "other" browsers are you?  :)

    Seems to be coming up OK for me, although there is a delay of a second or two.  I've been able to get it to come up in IE9, FF3.5, Chrome, Safari.

    Maybe try watching it on the YouTube site directly:

  • Hey,

    does i have to do this for every object (eg. city, office, phone,...) i want to sync with the AD?

    I'm a little bit confused, i thought there will be a sync between the ad and the service manager CMDB!?

  • @Jan -

    There is an out of the box connector to get data from AD into SCSM.  If you want to go back the other direction you need to set up a workflow as shown above.  You can pass multiple properties of the user object in a single workflow.  I just showed how to do one property by passing in the Office Phone Number.  You could also pass in the Office Number, home phone, department, etc. and update them all in a single call to the Set-ADUser PowerShell cmdlet.