The Answer + 1

I know I'm a relative newbie, but this just cost me two hours of troubleshooting an application sync issue that didn't exist.  Can somebody please tell me why this is returning a count that's one higher than the actual number of users in the group? 
I found my problem with a 40-something line VBS script, but this PowerShell command should have been able to do it in one line; or so I thought.
(dsget group "CN=GroupName" -members").count
Thanks for your help.

The output from the command is returned as an array of strings (one per line).  The count property is a count of the number of lines returned, The command adds a additional blank line after the list of members.  That blank line is your +1 in
the count.
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

Similar Messages

Maybe you are looking for

  • File adapter polls before the processing is finished in R3

    Hi, Polling in sender file adapter is set as 4 secs. The problem arises when more than one  files with same Service Order number are uploaded and the corresponding IDOCs are simultaneously received in R3 system. As one IDOC is already processing the

  • Bridge CC 64 Windows 8.1 not responding

    Installed Bridge CC 64 on a new computer running Windows 8.1. Intel i5 - 4440S 8GB Ram Intel 4400 Graphics Installation went fine. Opens a little slow but what ever you click on, pull-down menus, Computer, Folders I get a "not responding" error at th

  • BPM Process and data management

    Greetings, I want to ask a question related with best practice topics. What is the best way to manage the information generated by process execution?. Its ok to have a database different from the workflow database to store the most important data. I

  • How would i go about making a paralax scroller in actionscript 3.0?

    i have a page with too much information on it i wanted to do something that was origanal to my site.  so i picked a paralax scroller  so that windows with different  conetent on them and make a movie clip out of each perhapps in an embedded movie cli

  • Can we write Field Symbols in SELECT statement?

    Hi Can we write teh Fiel Symbols in the SELECT Statement ? Can you give how to write it, with Example ? Regards, N.L.Narayana