Tuesday
May272008
I do like it when the logical choice happens to be the one that works.
Tuesday, May 27, 2008 at 01:26PM Wanted an AD query in PoSh to pull back the count of all [users | computers | objects | puppies | socks | Phillie Phanatics] in my domain. Created the collection object I wanted using the Quest Get-QADObject cmdlet (lovely little toy)...
...then before Googling I had a "Let's see if this works" moment.
[PS] C:> $col.Count
> 211
Yeah, okay, that was easy.
(Yes, Brandon, I know I could've made it a one-liner by defining the $col in parenthesis on the same line that I called the Count member. Stop with the one-liner madness! ;-))
in
tech
tech
Reader Comments