In Powershell, what's the best way to join two tables into one?

后端 未结 3 1890
北恋
北恋 2020-11-22 01:39

I\'m fairly new to Powershell, and am wondering if someone knows of any better way to accomplish the following example problem.

I have an array of mappings from IP a

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 02:23

    You can use script block like this

    $leases | select IP, NAME, @{N='MAC';E={$tmp=$_.IP;($reservations| ? IP -eq $tmp).MAC}}
    

提交回复
热议问题