https://learn.microsoft.com/en-us/sysinternals/downloads/whois
In powershell:
# Create a tools directory in user's AppData folder
$toolsDir = "$env:LOCALAPPDATA\SysInternalTools"
New-Item -ItemType Directory -Path $toolsDir -Force
# Download WhoIs.zip from Microsoft
Invoke-WebRequest -Uri "https://download.sysinternals.com/files/WhoIs.zip" -OutFile "$toolsDir\WhoIs.zip"
# Extract the zip file
Expand-Archive -Path "$toolsDir\WhoIs.zip" -DestinationPath $toolsDir -Force
# Remove the zip file after extraction
Remove-Item "$toolsDir\WhoIs.zip"
# Add the tools directory to user's PATH
$currentPath = [Environment]::GetEnvironmentVariable("Path", "User")
if ($currentPath -notlike "*$toolsDir*") {
[Environment]::SetEnvironmentVariable("Path", "$currentPath;$toolsDir", "User")
}
After running these commands:
- Open a new PowerShell window to get the updated PATH
- You can now use
whois
from any location
Example usage:
whois microsoft.com