Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import-module ActiveDirectory
- $input=$args[0]
- $stringInput=$(Get-Content $input)
- $name,$firstname,$secondname,$pass=$stringInput.split(',')
- write-host $name
- write-host $firstname
- write-host $secondname
- write-host $pass
- $pass=convertto-SecureString -string $pass -Asplaintest -force
- new-aduser $name -GivenName $firstname -surname $secondname -AccountPassword $pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement