Author Posts

May 17, 2017 at 1:05 am

I am starting to create some Custom AD schema attributes. The first one I created was defined as singlevalued and checking it in ADSIEDIT confirms that. When I do a get-aduser -properties customatt, the string contained in that atttribute is displayed within curly brackets, usually indicating that it is an array or collection. Doing a GM on the returning object, the custom attribute definition is displayed as 'Deserialized.Microsoft.ActiveDirectory.Management.ADPropertyValueCollection' which also indicates it is an array or multivalued property. However when doing an '-is [array]' on the attribute I get false. I can certainly treat this property as though its a single string. Is this just a quirk of AD custom attributes and Powershell?


May 17, 2017 at 2:22 am

Yup. The commands hates custom attributes, my precious.

May 17, 2017 at 2:23 am

Thanks Gollum 🙂