Share via

Powershell CIM command script help

Anonymous
2021-11-24T20:47:01.993+00:00

What Get-CimInstance command can I use to get info about the number of network adapters and IP addresses?

I already have a command for getting the IP addresses and network adapter info thru the Get-CimInstance command

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Server | User experience | PowerShell

2 answers

Sort by: Most helpful
  1. Rich Matheisen 48,116 Reputation points
    2021-11-25T03:32:22.793+00:00

    The easiest way would be something like (Get-CimInstance . . . ).count

    If you already have a variable that contains the results of the Get-CimInstance then just get the "count" value from that: $x = Get-CimInstance . . . ; $x.count

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Anonymous
    2021-11-25T05:25:58.543+00:00

    I was able to get my script working fine with that part. I had almost everything done, but there were just a few things that I was missing, that are now solved. Thank you

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.