PowerShell V2 script to count the number of values in every non-linked multi-valued attribute of a specified object. The numbers are reported for each such attribute that has at least one value. Finally, the script reports the grand total number of values for all of the attributes. This grand total is limited by the system. If the forest functional level (FFL) is Windows 2000 Server, the limit is about 800 to 850 values. If the FFL is Windows Server 2003 or above, the limit is about 1200 to 1300 values.

The script accepts either a sAMAccountName or distinguished name. The script retrieves all multi-valued attributes of the object that have at least one value. For each attribute, the schema is checked to eliminate linked attributes, which are not limited. For each remaining attribute the script reports the lDAPDisplayName of the attribute, followed by the count of the number of values in parentheses. Finally, the script reports the sum of all of the counts. This last number is limited by Active Directory. When the limit is reached, the error reported is "The administrative limit for this request was exceeded".

CountValues.txt <<-- Click here to view or download the program