- This error will be raised if the AD object already exists.
- Also, an error will be raised if any of the attribute values is blank (or otherwise invalid).
- You cannot assign a blank (or Null) value to any attribute.
- If a missing value is possible, you may need to revise the script to check for this and only assign a value if the value is non-missing.
- Of course, mandatory attributes, like cn an sAMAccountName, cannot be missing.
- Perhaps similar (in part) to below:
If ($givenName -ne "") {$objUser.Put(“givenName”, $givenName)}