Get-DnsClientServerAddress
Set-DNSClientServerAddress "Wi-Fi" --ServerAddresses ("1.1.1.1"," 8.8.8.8")
Set-DNSClientServerAddress "InterfaceAlias" --ServerAddresses ("preferred-DNS-address", "alternate-DNS-address")
Open Command Prompt and type ipconfig /flushdns.
This command will flush the DNS.
Set-DNSClientServerAddress --interfaceIndex 12 --ServerAddresses (“10.0.0.1”,”10.0.0.2”)