Create New User on Domain via VB .NET or BATCH

Hi Experts,

I'm needing some help on starting up an App to create a new user on the Domain.

VB .NET is preferable.
I'm using VS 2010 Beta 2
Win Small Business '03
Mail is via Exchange

I'm just not sure where to start.
Most of the settings would be the same depending on their department.
I'd like to be able to run it locally.

There would be more to add to add the user to MS Dynamics Nav as well.
LVL 10
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What about the built in commandline tools for AD and LDAP. You can easily script user creation.

Malli BoppeCommented:
VBscripts for creating users accounts 
bromy2004Author Commented:
Is there anything in .NET?
I'd like to incorporate it to a Form as well as some other functionality.
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

you can use the ADinfinitum's easy..take the users from text file..and you can give the properties for all users..
bromy2004Author Commented:
Thank you for all the suggestions, but i would rather develop my own Program.
That way there isn't any subscription fees (ADinfinium) and i can combine the User creation with our system (MS Dynamics Nav)

You can use System.DirectoryServices.AccountManagement

like this:

using System.DirectoryServices.AccountManagement;

PrincipalContext p = null;
p = new PrincipalContext(ContextType.Domain, "acme", "dc=acme,dc=local");          
UserPrincipal usr = UserPrincipal.FindByIdentity(p, "john.doe@acme.local");

to find a upn en show the displayname.

More information about creating a user :

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I posted C# code, but on there is also information about using that namespace in VB.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.