This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Script to mod local autodiscover lookup in Outlook via https://ayrne.io | |
# Give local cache and hosts file DNS entries priority | |
$regPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider" | |
New-ItemProperty -Path $regPath -Name HostsPriority -propertyType DWORD -Value 3 -force | Out-Null | |
New-ItemProperty -Path $regPath -Name LocalPriority -propertyType DWORD -Value 4 -force | Out-Null | |
New-ItemProperty -Path $regPath -Name DnsPriority -propertyType DWORD -Value 5 -force | Out-Null | |
New-ItemProperty -Path $regPath -Name NetbtPriority -propertyType DWORD -Value 6 -force | Out-Null | |
# Set domain name | |
$domainName = Read-Host -Prompt "Enter The Domain Name" | |
# Create Hosts file entry |