Added some comments I felt was required
This commit is contained in:
parent
068b92458a
commit
41f36e582d
@ -11,8 +11,10 @@ forEach ($User in $Users)
|
||||
$lastname = $User.last
|
||||
$last = $lastname[0..2]
|
||||
$username = "$first$last"
|
||||
#Hack to fix weird spaces between characters
|
||||
$username = $username -replace " ", ""
|
||||
"dsadd user `"cn=$username, ou=Illuminati, dc=datavg2, dc=local -fn $firstname -ln $lastname -pwd Admin123" | out-file run.bat -Encoding "UTF8" -Append
|
||||
#Hack to wait .2 seconds between each command, because of outdated servers cant keep up with Active Directory
|
||||
"ping 192.0.2.2 -n 1 -w 2 > nul" | out-file run.bat -Encoding "UTF8" -Append
|
||||
}
|
||||
"echo Script has finished running, thanks based Daniel in 1ELA for making our lives easier" | out-file run.bat -Encoding "UTF8" -Append
|
||||
|
Loading…
Reference in New Issue
Block a user