Creating an AD user account with powershell using variables
$ou=[ADSI] "LDAP://ou=London,dc=domain,dc=local"
$newUser=$ou.create("user","cn=JoeUser2")
$newUser.Put("sAMAccountName","JUser2")
$newUser.SetInfo()
$newUser.SetPassword("Password1")
$newUser.Put("UserAccountControl","544")
$newUser.SetInfo()