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?
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.

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

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:
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

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
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
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
Hardware

From novice to tech pro — start learning today.