Link to home
Create AccountLog in
Avatar of Alan Varga
Alan VargaFlag for United States of America

asked on

Use the results of one PowerShell cmdlet to filter another cmdlet

I can get a window of all of the network adapters on my computer if I use
Get-CimInstance Win32_NetworkAdapter | Out-GridView -PassThru

Open in new window


I can get the physical addresses for all of the network adapters using
Ipconfig /All | Select-String Physical

Open in new window


How can I combine these to get the physical address for the adapter selected from the choices in the window?
SOLUTION
Avatar of Jason Crawford
Jason Crawford
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of Alan Varga

ASKER

Thank you both; I like elements of each of your approaches.  This is a great learning exercise, and I will be using these answers as jumping-off points.  I appreciate your time.

Alan