
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 01:39 PM
The log returned the following error:
A value for the attribute was not in the acceptable range of values HRESULT: [8322] Stack Trace: at Microsoft.ActiveDirectory.Management.AdwsConnection.ThrowExceptionForExtendedError(String extendedErrorMessage, Exception innerException) at Microsoft.ActiveDirectory.Management.AdwsConnection.ThrowExceptionForErrorCode(String message, String errorCode, String extendedErrorMessage, Exception inn...
How can I see which attribute is out of range? I started removing them from the New-ADUser call, but that is taking forever.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 08:50 PM
Yeah, it stinks that it doesn't say. I got bit by this with the samaccountname. It has a limit of 20 characters but, when I created the process, I was being lazy and just used the the same value that was provided in the name field. I didn't consider the name being longer than 20 characters.
You can find attribute max-lengths from here: https://docs.microsoft.com/en-us/windows/win32/adschema/attributes-all. Although there are probably more concise lists out there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 08:50 PM
Yeah, it stinks that it doesn't say. I got bit by this with the samaccountname. It has a limit of 20 characters but, when I created the process, I was being lazy and just used the the same value that was provided in the name field. I didn't consider the name being longer than 20 characters.
You can find attribute max-lengths from here: https://docs.microsoft.com/en-us/windows/win32/adschema/attributes-all. Although there are probably more concise lists out there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 06:14 AM
Turned out to be the Country attribute. I was passing in United States and it was expecting US. Oh the joy...