locked
Gather and count fields with results, ignoring blank fields RRS feed

  • Question

  • I'm trying to count the populated fields of a specific parameter from get-brokersession (a citrix commandlet) and ignore the blank fields.

    I run Get-BrokerSession -Property SmartAccessTags and it returns the populated fields (which I want to count) and blank fields which I want to ignore.  Is there an easy way to do this with one line?  I'm not very proficient in powershell scripting.  I know enough to add .count at the end to count the results, but I only want to count the fields that return results, not the blank lines.

    Any help would be greatly appreciated.

    Friday, March 27, 2020 1:57 PM

All replies

  • For Citrix issues you need to post in the Citrix forum for the Cmdlets that were written by Citrix.

    This will skip all empty entries.

    Get-BrokerSession -Property SmartAccessTags | 
        Where-Object{$_.SmartAccessTags}





    \_(ツ)_/

    Friday, March 27, 2020 2:09 PM
  • Awesome thanks!  That worked!
    Friday, March 27, 2020 3:15 PM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,

    Yang Yang

    Tuesday, March 31, 2020 9:48 AM