Lookup/Translation Table concept
I'm wondering what it's the best approach for implementing the following: If a user is located at site X, set his profile path to server002 If a user is located at site Y, zit his profile path to server010 ... This is an example where I would want to have some form of a table which says if you're in site x, then your profile server is server y. The same could apply if you set exchange mailbox quota based on the function of the user (like secretary, sales, directory, ...) One way would be to use declarative provisioning and use a lot of nested IIFs. Another way would be to write a rules extension and handle it over there. The rules extension on it's turn could use a XML config file which can be adjusted/extended easily witouth having to recompile. Any other suggestions on this topic? How are you guys dealing with this? http://setspn.blogspot.com
June 18th, 2010 7:21pm

A custom workflow could also solve this and query a database table or xml config file. Or you could setup a location or site object that has the profile path settings and mailbox store, then while creating the user select the location object for them and have an action workflow that performs the lookup and sets the attributes on the person.David Lundell www.ilmBestPractices.com
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2010 7:05pm

Hi There, Depending on where you want the work to occur, you can put it in the workflow as David suggested or within the sync engine itself. I've used a variety of methods for this type of operation within the synchronization engine including: In scenarios where I am getting a flat file of data from another source that isn't easily connected to via the Sync Engine: Load the file into an MA that projects the objects into their own special object and then use the MVSearch function to get back the object and the value I need. This is a fairly high overhead on the synchronization engine but has the benefits of not establishing a connection to an external SQL server or other data source so its always available. Built the required communication requirements to look up the data dynamically as required (whether it be SQL, LDAP, etc). In scenarios where I am manually managing the data and can easily edit the file on the server (and not have to maintain a database somewhere): Create a simple XML file that I load into a hash table when the sync engine initializes the rules extension. I then reference the hash table as required in the code. The loading of the table is minor overhead and only limited to memory and the hash table is keyed by the value you're looking up. For example: <sites> <london>Profile0001</london> <toronto>Profile0002</toronto> </sites> VB.NET Code Snippets Import of required System.XML components Imports System.XML Declaration of global variable ' Put this in your class as a global variable so you only need to load it once. Dim sitetable as Hashtable = New Hashtable Components for initialization routine ' *************** ' Put this in your initialization subroutine dim sitexmlfile as string = "C:\myfiles\sites.xml" siteListXml = loadSiteList() Function to read the XML file. ' **************** ' loadSiteList Function Function loadSiteList(byVal filename As String) as Hashtable Dim siteListXml As XmlDocument = New XmlDocument If File.Exists(filename) Then siteListXml.Load(filename) Else Throw New Exception("File not present error.") End If Dim currentNode As XmlNode For Each currentNode In siteListXml.SelectSingleNode("sites").ChildNodes loadSiteList.Add(currentNode.Name, currentNode.InnerText) Next Return loadSiteList End Function Note, as with any code, I took this from a sample of working code and changed some of the variables to protect the innocent. It is as is and provided as an example with no guarantees or warranties either implied or expressed. :) Hope this helps. B
July 27th, 2010 9:02pm

thansk for the advice. I had already choosen and implemented the XML aproach. Your code is more or less the same as I did mine.http://setspn.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
August 1st, 2010 11:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics