header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Create bulk test users in active directory
Last Post 25 Aug 2011 06:00 AM by Karl Mitschke. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
ognyangUser is Offline
New Member
New Member
Posts:1
Avatar

--
24 Aug 2011 04:46 PM
    Hello guys,

    Probably there is already such posts but I cant find any good scripts!

    I am not familiar with powershell... yet :) but I want to..

    I am reading some books but I have a task to create some bulk users.

    I want to create 50 test users with naming convention "TestUser##" (## will be replaced with 01,02,03.. to 50)

    The script will be runned on Win Srv 2k8R2. I found some scripts but they do not display the creation progress, so I can not monitor the process.

    Where I can find such script?

    Thank you very much in advance!!!

    KR,
    Ognyan Guglev
    Karl MitschkeUser is Offline
    Basic Member
    Basic Member
    Posts:457
    Avatar

    --
    25 Aug 2011 06:00 AM
    Try this:

     
    1..51 | ForEach { Net User "TestUser$_" P@ssW0rd /ADD /Domain} 
    


    From my blog post: Creating random users for a domain
    http://unlockpowershell.wordpress.c...-a-domain/

    Karl
    http://unlockpowershell.wordpress.com
    Co-Author, Windows PowerShell 2.0 Bible
    -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer