S
S
StenMarsh13372020-11-27 15:59:00
PowerShell
StenMarsh1337, 2020-11-27 15:59:00

Pull string with PowerShell?

Help with the code please, for example, the code starts ipconfig and the MAC address field displays

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Korotenko, 2020-11-27
@StenMarsh1337

ipconfig /all | findstr "Physical"

M
MaxKozlov, 2020-11-27
@MaxKozlov

If PS and Windows are fresher
Get-NetAdapter
and it has a MacAddress field

A
alhaos, 2020-11-29
@alhaos

([regex]"(?<=: )([0-9A-F]{2}-){5}[0-9A-F]{2}\s").Matches((&{ipconfig /all})).Value

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question