From 41f36e582d70f45a870e523cf617ffa4341db172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Thu, 22 Oct 2015 10:37:49 +0200 Subject: [PATCH] Added some comments I felt was required --- Commissions/Fredrik/Make Users.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Commissions/Fredrik/Make Users.ps1 b/Commissions/Fredrik/Make Users.ps1 index 68b4066..e41b9c7 100644 --- a/Commissions/Fredrik/Make Users.ps1 +++ b/Commissions/Fredrik/Make Users.ps1 @@ -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