Param([string]$computername=$env:computername) [regex]$ip4="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}" get-wmiobject win32_networkadapterconfiguration -filter "IPEnabled='True'" -computer $computername | Select DNSHostname,Index,Description,@{Name="IPv4";Expression={ $_.IPAddress -match $ip4}}, @{Name="IPv6";Expression={ $_.IPAddress -notmatch $ip4}},MACAddress