From 2fd82afadf07e0e99d2143de022a3c5181958283 Mon Sep 17 00:00:00 2001 From: freddy1623 Date: Thu, 22 Oct 2015 09:00:03 +0200 Subject: [PATCH] Update Make Users.ps1 dan.. u forgot the fuckings "-" in -pwd --- Commissions/Fredrik/Make Users.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Commissions/Fredrik/Make Users.ps1 b/Commissions/Fredrik/Make Users.ps1 index 8e7c7c5..c292419 100644 --- a/Commissions/Fredrik/Make Users.ps1 +++ b/Commissions/Fredrik/Make Users.ps1 @@ -1,5 +1,5 @@ ############################################ -## Script by Daniel Løvbrøtte Olsen, 1ELA ## +## Script by Daniel Løvbrøtte Olsen, 1ELA ## ## For Fredrik Refstie ## ############################################ @@ -12,10 +12,10 @@ forEach ($User in $Users) $last = $lastname[0..2] $username = "$first$last" $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 + "dsadd user `"cn=$username, ou=Illuminati, dc=datavg2, dc=local -fn $firstname -ln $lastname -pwd Admin123" | 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 "PAUSE" | out-file run.bat -Encoding "UTF8" -append "@ECHO OFF" | out-file run.bat -Encoding "UTF8" -append "DEL `"%~f0`"" | out-file run.bat -Encoding "UTF8" -append -Start-Process "cmd.exe" "/c run.bat" \ No newline at end of file +Start-Process "cmd.exe" "/c run.bat"