LMHOSTS is a file that contains all information about the IP mapping of the Domain name or the remote servers connected to the system via TCP/IP protocol. In this post, we will see how to disable LMHOSTS Lookup using PowerShell, Registry, or Adapter Properties.
What is the LMHOSTS file?
LMHOSTS or LAN Manager Hosts file enables Domain Name Resolution, especially when other methods such as WINS fail. When you install a Windows OS on your system, a file named lmhosts.sam is created. This is a sample file that you can find at the following location. To know more about LMHOSTS, go through the .sam or sample file located in the System32 folder.
Where are LMHOSTS lookup files located?
As mentioned earlier, LMHOSTS is a text file. And you can easily find the file from the following location.
There you can see LMHOSTS Lookup files.
Disable LMHOSTS Lookup using PowerShell, Registry, or Adapter Properties
You can enable or disable LMHOSTS Lookup with the help of the following methods:
- By PowerShell
- By Registry
- By Adapter Properties
Let us talk about them in detail.
Let us start with PowerShell. Launch PowerShell from the Start Menu and execute the following commands:
$DisableLMHosts_Class=Get-WmiObject -list Win32_NetworkAdapterConfiguration
Wait for it to complete and LMHOSTS Lookup will be disabled.
2] By Registry
If you are familiar with Registry Editor and not with PowerShell, you can use it to disable LMHOSTS Lookup.
Before moving forward, we recommend you create a backup of your registries. You can do that by File > Export > Save your Backup file.
After creating the backup, use the following steps to stop the LMHOSTS Lookup.
Open Registry Editor from the Start Menu.
Double-click on EnableLMHOSTS set Value data to 0, and click Ok.
This will disable the protocol for you.
Related: What is the HOSTS file in Windows?
3] By Adapter Properties
Now, if you think both methods mentioned above are technical, you can do the same thing by Adapter Properties and in this section, we are going to see how to do the same.
To disable LMHOSTS Lookup using Adapter Properties, follow the given steps.
- Launch Control Panel from the Start Menu.
- Click Network and Sharing Center > Change adapter settings.
- Right-click on the connected network and select Properties.
- Double-click on Internet Protocol Version 4(TCP/IPv4).
- Now, click Advanced.
- Go to the WINS tab, untick Enable LMHOSTS lookup, and click Ok.
This is the easiest way by which you can disable LMHOSTS lookup.