Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How can I count how many properties an object has?

$
0
0

Hi folks,

I'd like to know how many properties an object has.
Lets take an AD user object for example:

$u = Get-ADUser -identity MyName -prop *

$u is one object (not an array) with many attributes.

How do I count these attributes?

Additional: Some attributes are doubled, I know: Modified = modifyTimeStamp = whenChanged, the same with Created. Maybe there is way to count the "real AD attributes" without and duplicates?

Thanks
Walter



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>