a guest Aug 12th, 2016 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- $computer = $Env:ComputerName
- $text = "C:accounts.csv"
- $user = import-csv -path $text
- foreach($strUser) in $user)
- $user = $struser.user
- $password = $struser.password
- $description = $struser.description
- $group = $struser.group
- $ObjOU = [ADSI]"WinNT://$computer"
- $objUser = $objOU.Create("User", $user)
- $objGroup = [ADSI]"WinNT://$computer/$group"
RAW Paste Data