英文:
get all local IP address Using powershell in txt file. Want to filter MAC address
问题
I want to save all active IP address under 192.168.1 subnet mask and there MAC address starts with "00:1f".
This question is already answered but how can I filter using MAC address and save only IP not other information.
英文:
I want to save all active IP address under 192.168.1 subnet mask and there MAC address starts with "00:1f".
This question is already answered but how can I filter using MAC address and save only IP not other information.
答案1
得分: 1
使用Get-NetNeighbor
并使用Where-Object
过滤输出:
Get-NetNeighbor -IPAddress 192.168.1.* | Where-Object LinkLayerAddress -like '00-1F-*' | ForEach-Object IPAddress
英文:
Use Get-NetNeighbor
and filter the output with Where-Object
:
Get-NetNeighbor -IPAddress 192.168.1.* |Where-Object LinkLayerAddress -like '00-1F-*' |ForEach-Object IPAddress
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论