get Filtered result in powershell

Viewed 285

I want to have filtered result based on 'some string value' from output of a command. For example, i need to get MAC address from output of ipconfig. i tried

 ipconfig /all | Select-String -Pattern "Physical Address" 

I am getting all MAC Addresss like

 Physical Address. . . . . . . . . : AA-AA-AA-AA-AA-AA
 Physical Address. . . . . . . . . : AA-AA-AA-AA-AA-AA

I want to have only Mac address of wifi adapter. SO output would be AA-AA-AA-AA-AA-AA. I dont want entire line

Physical Address. . . . . . . . . : AA-AA-AA-AA-AA-AA
3 Answers
Related