I am running a following script
[System.Net.Dns]::GetHostEntry('') | Where-Object {$_.AddressList -like "IPv4*"}
Which gives me this output:
HostName Aliases AddressList
-------- ------- -----------
SERVER1.domain.com {} {REDACTED_IPv6, IPv4.x.x.x}
My desired result would be this:
HostName Aliases AddressList
-------- ------- -----------
SERVER1.domain.com {IPv4.x.x.x}
How can I go about achieving that?