I am trying to make a simple script to create a new computer object in AD. I took out all variables and put the real data in and i get an error. Below is the line of code I am trying to run. Under that is the error. Can somebody help
me out?
CODE:
New-ADComputer -Name XXXXXXXX -Description test -Path "OU=Laptop,OU=Computers,OU=SID,OU=US,OU=NA,OU=XXXXX,DC=XXX,DC=ad,DC=XXXXXX,DC=com" -SAMAccountName XXXXXXXX
ERROR:
New-ADComputer : A required attribute is missing
At line:1 char:1
+ New-ADComputer -Name XXXXXXXX -Description test -Path
"OU=Laptop,OU=Computers,OU ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : NotSpecified: (CN=XXXXXXXX,OU=...,DC=XXXX,DC=com
:String) [New-ADComputer], ADException
+ FullyQualifiedErrorId : A required attribute is missing,Microsoft.Active
Directory.Management.Commands.NewADComputer