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
bromy2004Asked:
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");
MessageBox.Show(usr.DisplayName);

to find a upn en show the displayname.

More information about creating a user : http://msdn.microsoft.com/en-us/library/bb384369.aspx
0
 
Encrypted1024Commented:
What about the built in commandline tools for AD and LDAP. You can easily script user creation.

 http://technet.microsoft.com/en-us/library/cc778414(WS.10).aspx

0
 
Malli BoppeCommented:
VBscripts for creating users accounts
http://www.computerperformance.co.uk/vbscript/index.htm 
0
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.
0
 
yousef_adCommented:
you can use the ADinfinitum ..it's easy..take the users from text file..and you can give the properties for all users..
http://www.newfawm.com/adi2.htm
0
 
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)

Thanks
0
 
wizzie83Commented:
I posted C# code, but on http://msdn.microsoft.com/en-us/library/system.directoryservices.accountmanagement.aspx there is also information about using that namespace in VB.
0
All Courses

From novice to tech pro — start learning today.