Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable IE security on Windows Server via PowerShell

it happens all the time, I spin up a vm with windows server and I can't access the internet because of IE security. Does anyone have a straight-forward PowerShell script for disabling IE security?

like image 506
Chris Hayes Avatar asked Feb 20 '12 20:02

Chris Hayes


People also ask

How do I turn off IE security?

In the Windows Components Wizard dialog that is displayed, in the Components panel, select the Internet Explorer Enhanced Security Configuration entry and click Details. In the Internet Explorer Enhanced Security Configuration dialog that is displayed, clear the check boxes for the listed user groups and click OK.

How do I disable Internet Explorer Enhanced Security Configuration in Windows Server?

Enter Server Manager in Windows search to start Server manager application. Select Local Server. Navigate to the IE Enhanced Security Configuration property, select the current setting to open the property page, select the Off option button for the desired users, and then select OK.

How do I disable Internet Explorer on Windows Server?

Log in to Windows Server and launch the Settings app. Now select Apps and in the Apps & Features window, select Optional Features. What is this? On the Optional Features window, scroll down and look for Internet Explorer under Installed Features and select Uninstall.


1 Answers

function Disable-InternetExplorerESC {     $AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"     $UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"     Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0     Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0     Stop-Process -Name Explorer     Write-Host "IE Enhanced Security Configuration (ESC) has been disabled." -ForegroundColor Green } function Enable-InternetExplorerESC {     $AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"     $UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"     Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 1     Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 1     Stop-Process -Name Explorer     Write-Host "IE Enhanced Security Configuration (ESC) has been enabled." -ForegroundColor Green } function Disable-UserAccessControl {     Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 00000000     Write-Host "User Access Control (UAC) has been disabled." -ForegroundColor Green     } 

drop this into a .ps1 file

then at the prompt type a period, a space and the path to the file something like this:

[PS 1] . C:\Users\Administrator\Desktop\YourPowerShellScript.ps1 

Then you can call the command at the prompt:

[PS 1] Disable-InternetExplorerESC 
like image 115
Chris Hayes Avatar answered Oct 13 '22 03:10

Chris Hayes