PowerShell AD to ADLDS Example

This page contains a script that Syncs data between Active Direcotry and Active Directory Light Weight Directory Services

The program uses the credentials of the current user and assumes the program is running on a domain member workstation or server. It only searches the domain that the user is logged in to. As far as I know all of the attributes Iím accessing are native to the default Windows 2003 AD schema with Exchange 2007 installed. No additional configuration should be required. I went crazy with the commenting, but if you have any questions you may send them to me at Robert@Rkirchhof.com

Some of the stuff I had a hard time finding out how to do (That are in this program) include.

In future installments I intend to show you how to sort the listview data by clicking its column and how to write to all of these fields. The ATGM program shows a lot of how to work with groups but it does have some dangerous features.
Oh, one other thing. Youíll have to add a reference to System.DirectoryServices and System.DirectoryServices.AccountManagement in most versions of Visual Studio you right click on the project name (In the Solution Explorer) itís on the far right of the screen. Select Add Referance, when the Add Reference box opens select the .NET tab scroll down till you see the reference you wish to Add, hold the Ctrl key and select System.DirectoryServices.AccountManagement and System.DirectoryServices then click OK.
View this Code in it's own TAB
Download Example_1.zip