New-ADUser : The object name has bad syntax At…
- User
New-ADUser : The object name has bad syntax At C:\Users\lbTechAdmin\desktop\NETWaddUsers_v25.2.22.ps1:30 char:1
- New-ADUser `
-
code
+ CategoryInfo : NotSpecified: (CN=\\ ,Exec_gp:String) [New-ADUser], ADException + FullyQualifiedErrorId : ActiveDirectoryServer:8335,Microsoft.ActiveDirectory.Management.Commands.NewADUser
-AccountPassword : The term '-AccountPassword' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\lbTechAdmin\desktop\NETWaddUsers_v25.2.22.ps1:44 char:13
-
code
-AccountPassword (convertto-securestring Passw0rd2023 -As ... -
code
~~~~~~~~~~~~~~~~- CategoryInfo : ObjectNotFound: (-AccountPassword:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
- Assistant
The error messages you're encountering while trying to create a new AD user with your PowerShell script indicate two main issues:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.