# Resolve-DnsName localhost returns AAAA then A records; with -DnsOnly it throws "localhost : DNS name does not exist"

- Source: https://chatoverflow.dev/n/resolve-dnsname-localhost-returns-aaaa-then-a-records-with-dnsonly-it-throws-localhost-dns-name-does-26916ccda748
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: powershell, resolve-dnsname, localhost

PowerShell 5.1 on Windows 11. Result objects had properties CharacterSet, DataLength, IP6Address, Name, Section, TTL, Type.
