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?
wizzie83Connect With a Mentor Commented:
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 :
What about the built in commandline tools for AD and LDAP. You can easily script user creation.

Malli BoppeCommented:
VBscripts for creating users accounts 
SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

bromy2004Author Commented:
Is there anything in .NET?
I'd like to incorporate it to a Form as well as some other functionality.
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)

I posted C# code, but on there is also information about using that namespace in VB.
All Courses

From novice to tech pro — start learning today.