We are using Active Directory and I would like a program that cycles thru the users in an OU and checks to see if they have a home directory on our server. If they do not have a home directory, then it will create it and give the user rights.
For example, bsmith is in OU=Students,OU=Users,DC=MyDomain,DC=Local. As the program cycles thru this OU, it grabs the username bsmith and checks if a folder named bsmith exists in \\myserver\users\students. When it doesn't find a folder called bsmith, it creates it and gives bsmith rights to it.
Can someone help me with the code for this program? I am most familiar with VB6, but I do have VS 2010 and I'm assuming it would be easier to accomplish in VB.net. Please, I'm looking for code, not links.