Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- SETLOCAL EnableDelayedExpansion
- SET COUNT=0
- :: Create 10 Users with Username=DomainOp_[NUM], Password=Password01, Memberof=DomainOps,ExchangeUsers
- FOR /L %%i IN (1,1,10) DO (
- SET /A COUNT+=1
- 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
- )
- SET /A COUNT=0
- :: Create 10 Users with Username=WebServerOp_[NUM], Password=Password01, Memberof=WebServerOps,ExchangeUsers
- FOR /L %%i IN (1,1,10) DO (
- SET /A COUNT+=1
- 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
- )
- SET /A COUNT=0
- :: Create 10 Users with Username=MailServerOp_[NUM], Password=Password01, Memberof=MailServerOps,ExchangeUsers
- FOR /L %%i IN (1,1,10) DO (
- SET /A COUNT+=1
- 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
- )
- SET /A COUNT=0
- :: Create 10 Users with Username=DomainUser_[NUM], Password=Password01, Memberof=DomainUsers,ExchangeUsers
- FOR /L %%i IN (1,1,10) DO (
- SET /A COUNT+=1
- 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
- )
- :: Organizational Units (OU) Needed - DomainOps, WebServerOps, MailServerOps, DomainUsers
- :: Groups Needed - DomainOps, WebServerOps, MailServerOps, DomainUsers, ExchangeUsers
Advertisement
Add Comment
Please, Sign In to add comment