tankdthedruid

create_users.bat

Nov 14th, 2011
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @ECHO OFF
  2. SETLOCAL EnableDelayedExpansion
  3. SET COUNT=0
  4.  
  5. :: Create 10 Users with Username=DomainOp_[NUM], Password=Password01, Memberof=DomainOps,ExchangeUsers
  6. FOR /L %%i IN (1,1,10) DO (
  7.     SET /A COUNT+=1
  8.     DSADD USER "CN=DomainOp_!COUNT!,OU=DomainOps,DC=wewillhackyou,DC=com" -fn Domain -ln Operator -display DomainOp_!COUNT! -pwd Password01 -memberof DomainOps -memberof ExchangeUsers -upn DomainOp_!COUNT!@wewillhackyou.com -email DomainOp_!COUNT!@wewillhackyou.com -acctexpires never
  9. )
  10.  
  11. SET /A COUNT=0
  12.  
  13. :: Create 10 Users with Username=WebServerOp_[NUM], Password=Password01, Memberof=WebServerOps,ExchangeUsers
  14. FOR /L %%i IN (1,1,10) DO (
  15.     SET /A COUNT+=1
  16.     DSADD USER "CN=WebServerOp_!COUNT!,OU=WebServerOps,DC=wewillhackyou,DC=com" -fn WebServer -ln Operator -display WebServerOp_!COUNT! -pwd Password01 -memberof WebServerOps -memberof ExchangeUsers -upn WebServerOp_!COUNT!@wewillhackyou.com -email WebServerOp_!COUNT!@wewillhackyou.com -acctexpires never
  17. )
  18.  
  19. SET /A COUNT=0
  20.  
  21. :: Create 10 Users with Username=MailServerOp_[NUM], Password=Password01, Memberof=MailServerOps,ExchangeUsers
  22. FOR /L %%i IN (1,1,10) DO (
  23.     SET /A COUNT+=1
  24.     DSADD USER "CN=MailServerOp_!COUNT!,OU=MailServerOps,DC=wewillhackyou,DC=com" -fn MailServer -ln Operator -display MailServerOp_!COUNT! -pwd Password01 -memberof MailServerOps -memberof ExchangeUsers -upn MailServerOp_!COUNT!@wewillhackyou.com -email MailServerOp_!COUNT!@wewillhackyou.com -acctexpires never
  25. )
  26.  
  27. SET /A COUNT=0
  28.  
  29. :: Create 10 Users with Username=DomainUser_[NUM], Password=Password01, Memberof=DomainUsers,ExchangeUsers
  30. FOR /L %%i IN (1,1,10) DO (
  31.     SET /A COUNT+=1
  32.     DSADD USER "CN=DomainUser_!COUNT!,OU=DomainUsers,DC=wewillhackyou,DC=com" -fn MailServer -ln Operator -display DomainUser_!COUNT! -pwd Password01 -memberof DomainUsers -memberof ExchangeUsers -upn DomainUser_!COUNT!@wewillhackyou.com -email DomainUser_!COUNT!@wewillhackyou.com -acctexpires never
  33. )
  34.  
  35. :: Organizational Units (OU) Needed - DomainOps, WebServerOps, MailServerOps, DomainUsers
  36. :: Groups Needed - DomainOps, WebServerOps, MailServerOps, DomainUsers, ExchangeUsers
Advertisement
Add Comment
Please, Sign In to add comment