New-ADUser -Path "ou=User Accounts,dc=contoso,dc=com" -Name "Mary North" -SAMAccountName "mary.north" -UserPrincipalName "mary.north@contoso.com" -EmailAddress "mary.north@contoso.com" -GivenName "Mary" -Surname "North" -Description "Sales Representative in Australia" -Company "Contoso, Ltd." -Department "Sales" -Office "Sydney" -AccountPassword (ConvertTo-SecureString -AsPlainText "Pa$$w0rd" -Force) -ChangePasswordAtLogon $true -Enabled $true
method115 wrote: » New-ADUser -Path "ou=User Accounts,dc=contoso,dc=com" -Name "Mary North" -SAMAccountName "mary.north" -UserPrincipalName "mary.north@contoso.com" -EmailAddress "mary.north@contoso.com" -GivenName "Mary" -Surname "North" -Description "Sales Representative in Australia" -Company "Contoso, Ltd." -Department "Sales" -Office "Sydney" -AccountPassword (ConvertTo-SecureString -AsPlainText "Pa$$w0rd" -Force) -ChangePasswordAtLogon $true -Enabled $true I went through the command twice and all quotation markets and brackets were closed.
IT Explorer wrote: » Did you use "Import-Module ActiveDirectory" at the begining ?
Zartanasaurus wrote: » If he hadn't imported the AD mod, he'd get an error telling him the cmdlet was unrecognized. Anytime I've gotten the >> it's because of mismatched single or double quotes.