Monthly Update of External Contacts Exchange 2010
by gmbaal at 2013-01-17 05:58:55
I have a task that I have to start doing once a month to update a list of contacts to a public folder. A former co-worker has done this for our company in the past and I have inherited this duty and I'm very new to powershell scripting.
So the information comes to me in a .csv that has the full list of current contacts that need to be in this list. What I am needing to know how to do is take the data from this .csv and import only the changes or new entries from this .csv into the public folder that we have on the exchange server.
I know that my predecessor used Powershell to get the information in there, so I'm sure that there is a way to do this for a monthly reoccurring process to ensure that this list is modified without having to remove the public folder and republishing the public folder and syncing it on the devices that have this list again.
We are dealing with Exchange 2010.
by DonJ at 2013-01-17 06:51:11
SInce there's probably no useful "this is new" field in your CSV, you'll have to query all existing external contacts and put them in a variable. Then import your CSV into a variable. Then Comapre-Object the two (this is just one approach, of course). That'll show you the difference – and you run through those and add 'em.
by gmbaal at 2013-01-17 10:13:28
Yeah, initially it will be a fresh copy of the csv. Going forward after this month there will be a monthly export to CSV from a SQL Database of contacts that I will need to update. I'm pretty new to powershell and have only used it by looking up reference syntax and mostly for Hyper-V related stuff. I want to try to streamline the process as much as possible so I can just put the csv in the right location and run a script or something like that, or further automate the process from there.
Thanks for the info.
You must be logged in to reply to this topic.