![]() ![]() ![]() This script was written using PowerShell v3.0, running on a windows 7 desktop and interfacing with exchange 2007 on a Windows 2003 serverįirst we need to establish a link to the EWS assembly, and define the exchange version. It also demonstrates several other PowerShell syntax items, including using # to start a comment line ` as continuation line character, as well as some other basic functions. ![]() This example sets up the EWS interface service, defines a process contacts function, then imports and loops through a CSV of contacts to be maintained. Here, Priv1.edb is the private folder database file of Exchange Server with Exchange mailbox information like default emails and attachments, and Pub1.edb is the public folder. Below are the basics that allowed me to not only import new contacts into Exchange using PowerShell, but also to add the ability to maintain existing contacts. If you are using Exchange Server 2000 & 2003, you can locate your EDB files at: C:Program FilesExchsrvrMDBDATAPriv1.edb. We were replacing our VBScripts interfacing with exchange 2003/2007, and preparing to migrate into exchange 2010/2013. ![]() Much of the setup and preperation in my script below is similar to existing examples, but I put together the rest of the pieces and added the logic to work with contacts in a public folder structure. Existing examples of PowerShell scripts didn't seem to include all the pieces to successfully manage contacts in an exchange public folder. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
August 2023
Categories |