Add commands to remove licensing servers from hosts
This commit is contained in:
parent
a06b6cf9db
commit
8c960a8ea7
@ -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
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user