Jesin's Blog

Welcome to the Portal of Technology

  • Facebook
  • GitHub
  • Google+
  • RSS
  • Twitter
  • Home
  • Categories
    • Domains
    • Linux
    • Networking
    • PHP
    • Virtualization
    • Web Design
    • Web Servers
    • Windows
  • WordPress Plugins
    • Custom Error Pages
    • HTTP Digest Authentication
    • Mailgun Email Validator
  • Toolbox
    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool
  • About Me
  • Contact Me
  • Sitemap
Home ›
windows scripts

Active Directory User Creation Script

June 20, 2011 Windows Jesin A Leave a Comment

windows category thumbnail

Bulk User creation in Active Directory is made easy with the VBScript given here. Thousands of users can be created at the click of a button. Lets go step by step creating this script. Open notepad and save it by typing “create-users.vbs” INCLUDING the double quotes. This will create a file with a .vbs extension instead of .txt. Then type the following code.

set objCON = GetObject("LDAP://CN=Users, DC=example, DC=net")
Set objUser = objCON.Create("user","CN=User1")
objUser.Put "sAMAccountName", "user1"
objUser.SetInfo()

This will create an user with name “User 1” and login name “user1” in the active directory domain example.net in the Users container. By default the user account will be disabled to create account and enable them using the script itself add the following code to the end of the code aboveContinue Reading…

Tags: windows scripts, windows server

Get a wealth of information delivered to your inbox. Subscribe and never miss a single article.

  • Tutorials and howtos
  • Code, scripts and commands
  • Online Tools

* No spam, unsubscribe anytime

Hire Me

  • SSL installation and hardening (A+ on Qualys SSL test)
  • Apache & Nginx configuration
  • Email deliverability improvement (10/10 on Mail Tester & MailGenius)
  • WordPress customization, optimization and migration
  • and much more…

    Tools

    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool

    Nav

    • Home
    • About Me
    • Contact Me
    • Privacy Policy
    • Sitemap
    Vultr SSD VPS

    Creative Commons License
    Jesin's Blog by Jesin A is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
    Based on a work at websistent.com.