Sum Unique Items in Group-Object

Welcome Forums General PowerShell Q&A Sum Unique Items in Group-Object

Viewing 2 reply threads
  • Author
    Posts
    • #242333
      Participant
      Topics: 6
      Replies: 16
      Points: 111
      Rank: Participant

      Hello friends, I need help developing a PowerShell-esque solution to aggregating unique objects in a Group-Object output.  My code so far returns

      I am trying to sum all the objects that have a count of 1 and aggregate them into one object (the Count:5 Name: Unique IR)

      Thanks!

       

      Name IRNumber
      Last, First1 Not Found
      Last, First2 Not Found
      Last, First3 Not Found
      Last, First4 Not Found
      Last, First5 Not Found
      Last, First6 Not Found
      Last, First7 Not Found
      Last, First8 Not Found
      Last, First9 Not Found
      Last, First10 Not Found
      Last, First01 Service Account
      Last, First02 Service Account
      Last, First03 Service Account
      Last, First04 Service Account
      Last, First05 Service Account
      Last, First06 Service Account
      Last, First07 Service Account
      Last, First08 Service Account
      Last, First09 Service Account
      Last, First10 Service Account
      Last, First 20 Local Admin Account
      Last, First 21 Local Admin Account
      Last, First 22 Local Admin Account
      Last, First 23 Local Admin Account
      Last, First 24 Local Admin Account
      Last, First 25 Local Admin Account
      Last, First 26 Local Admin Account
      Last, First 27 Local Admin Account
      Last, First 28 Local Admin Account
      Admin1 Domain Admin
      Admin2 Domain Admin
      Admin3 Domain Admin
      Last, First 36 IR56242
      Last, First 43 IR56242
      Last, First 46 IR56242
      Last, First 48 IR56242
      Last, First 55 IR56242
      Dux, Frank IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 70 IR56242
      Last, First 50 IR44372
      Last, First 33 IR42115
      Last, First 32 IR29068
      Last, First 32 IR29068
      Last, First 32 IR29068
      Last, First 40 IR27733
      Last, First 49 IR243582
      Last, First 37 IR243581

      • This topic was modified 2 months, 1 week ago by tluizzi.
      • This topic was modified 2 months, 1 week ago by tluizzi.
      • This topic was modified 2 months, 1 week ago by tluizzi.
    • #242354
      Participant
      Topics: 7
      Replies: 2458
      Points: 6,439
      Helping Hand
      Rank: Community MVP

      Thomas
      How about sharing some sample data to play with? 😉 … formatted as code as well please.

    • #242360
      Participant
      Topics: 6
      Replies: 16
      Points: 111
      Rank: Participant

      Hello, thanks for helping.  This sample data is different from what I provided up.

      Looking to get:

      Thanks again

Viewing 2 reply threads
  • You must be logged in to reply to this topic.