From 8c960a8ea75d27805d125ed4b067e625cf2071c3 Mon Sep 17 00:00:00 2001 From: WindowsAddict Date: Sun, 2 Feb 2025 18:37:44 +0530 Subject: [PATCH] Add commands to remove licensing servers from hosts --- docs/licensing-servers-issue.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/licensing-servers-issue.md b/docs/licensing-servers-issue.md index f0156d9..ba3f38f 100644 --- a/docs/licensing-servers-issue.md +++ b/docs/licensing-servers-issue.md @@ -18,13 +18,19 @@ We suggest following the below guide only when the script tells you to do so. - Open Powershell as admin and enter below commands, ``` +Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyEnable -Type DWord -Value 0 +Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer -Type String -Value "" + +$filePath = "$env:SystemRoot\System32\drivers\etc\hosts" +Set-Content -Path $filePath -Value (Get-Content $filePath | ForEach-Object { $_ -replace '.*licensing.mp.microsoft.com.*', ''}) -force +Set-Content -Path $filePath -Value (Get-Content $filePath | ForEach-Object { $_ -replace '.*purchase.mp.microsoft.com.*', ''}) -force +Set-Content -Path $filePath -Value (Get-Content $filePath | ForEach-Object { $_ -replace '.*login.live.com.*', ''}) -force + netsh int ip reset netsh winsock reset netsh advfirewall reset netsh winhttp reset proxy bitsadmin /util /setieproxy localsystem NO_PROXY RESET -Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyEnable -Type DWord -Value 0 -Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer -Type String -Value "" ipconfig /flushdns ```