I found this code on the internet and it purports to remove all [,],{,}
characters from the IPaddress field. However, it does not work (on PowerShell 5.1). I very much like the concept of this and would like to use a working version of this:
get-wmiobject win32_networkadapterconfiguration | where {$_.IPAddress -ne $Null} | select @{label="IP address";Expression={$_.IPAddress -replace '[{}]',''}}, MACAddress
- How can I get this to work, i.e., to remove
[,],{,}
from the IPAddress field? - Additionally, how could I split the addresses such that IPv4 are in one column and IPv6 addresses are in another?