0

I have an object with properties such as username and destination IP. I'm attempting to count whenever the username and IP are the same and produce that number, so I can work with those results whenever a threshold is met. However, I'm not sure how to go about this. I thought group-object might work, but since it's not just a single property I'm stumped.

Is there an easy way to do this?

Data example:

username, destination IP
abuckey, 10.10.10.10
dfumley, 11.11.11.11

Code Example: This will group by the username:

$ReportObject | Group-Object -Property "Username"

1 Answer 1

4

Just specify both properties:

$ReportObject | Group-Object -Property username,'destination IP'
Sign up to request clarification or add additional context in comments.

1 Comment

Wow, I didn't think it would be that easy. Thank you so much!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.