"import-csv -path C:\mac.csv | foreach {
$a=$_.name
Get-DhcpServerv4Scope | Get-DhcpServerv4Lease |where {$_.ClientId -like ""$a"" }} | export-csv c:\computer.csv -NoTypeInformation -encoding utf8"
csv文件
name
a1d3g5hef4
windows DHCP根据MAC地址批量导出DHCP服务器中的计算机名,导出到csv
原文:https://www.cnblogs.com/victor0/p/13289689.html