SlideShare a Scribd company logo
How To Disable IE Enhanced Security - PowerShell
i | P a g e
Table of Contents
Overview.......................................................................................................................................................1
Applies To..................................................................................................................................................1
Pre-Requisites ...........................................................................................................................................1
PowerShell Script – Disable IE Enhanced Security........................................................................................1
Code Snippet.............................................................................................................................................1
PowerShell Output....................................................................................................................................3
Registry Key – Already Configured........................................................................................................3
Registry Key – Admin Profile Enabled...................................................................................................3
Registry Key – User Profile Enabled......................................................................................................4
Registry Key – Not Configured..............................................................................................................4
How To Disable IE Enhanced Security - PowerShell
1 | P a g e
Overview
In this post we will walk-through the process of disabling Internet Explorer's Enhanced Security.
By default registry key value of IsInstalled is set to “1”, which means is IE Enhanced Security configuration
is “Enabled”. If the registry key value is set to “0” then IE Enhanced Security configuration is disabled.
Applies To
Tested on Windows 10, Windows 2008 R2 and Windows 2012.
Pre-Requisites
Launch PowerShell Command Console or PowerShell ISE.
To run this script, Execution Policy should be set to either of these “AllSigned” or “RemoteSigned” or
“Unrestricted”, you can get current execution policy by running the command; “Get-ExecutionPolicy”.
Policy Type Purpose
Restricted No scripts can be run. Windows PowerShell can be used only in interactive mode.
AllSigned Only scripts signed by a trusted publisher can be run.
RemoteSigned Downloaded scripts must be signed by a trusted publisher before they can be run.
Unrestricted No restrictions; all Windows PowerShell scripts can be run.
PowerShell Script – Disable IE Enhanced Security
The script posted in this article will read the system's registry key and the value set for component and its
configured value, if configuration is already disabled, it will display IsInstalled Registry key value which is
set to “0” when the configuration is disabled.
Code Snippet
#
# Define Environment Variables
# Define Registry Key for Admin and Current User for IE Enhanced Security
#
$IE_ES_Admin_Key="HKLM:SOFTWAREMicrosoftActive SetupInstalled Components{A509B1A7-
37EF-4b3f-8CFC-4F3A74704073}"
$IE_ES_User_Key="HKLM:SOFTWAREMicrosoftActive SetupInstalled Components{A509B1A8-37EF-
4b3f-8CFC-4F3A74704073}"
# Check Registry Key - System Profile Key Exists
#
Clear-Host
if ((Test-Path -Path $IE_ES_Admin_Key)) {
$ARegistryValue=(Get-ItemProperty -Path $IE_ES_Admin_Key -Name IsInstalled).IsInstalled
How To Disable IE Enhanced Security - PowerShell
2 | P a g e
if ($IE_ES_Admin_Key -ne "") {
if ($ARegistryValue -eq "" -or $ARegistryValue -ne 1) {
Write-Host `n$IE_ES_Admin_Key -BackgroundColor Black -ForegroundColor Green
Write-Host "`nIE Enhanced Security is Already Disabled for Admin ......"
write-host `n`nCurrently Registry Value is set to $ARegistryValue `, No changes have been done. -
ForegroundColor Black -BackgroundColor White
[console]::Beep(600,800)
} elseif ($ARegistryValue -eq 1) {
Clear-Host
Write-Host "`nIE Enhanced Security is Currently Enabled for Admin ......"
Get-ItemProperty -Path $IE_ES_Admin_Key | Select-Object PSPath, IsInstalled, PSDrive | fl
Read-Host "Press Any Key..." | Out-Null
Write-Host "`nDisabling Now.. $IE_ES_Admin_Key `n`n##### Shown is the Updated Setting ####" -
ForegroundColor DarkYellow -BackgroundColor Black
[console]::Beep(600,800)
Set-ItemProperty -Path $IE_ES_Admin_Key -Name "IsInstalled" -Value 0 -Force
Get-ItemProperty -Path $IE_ES_Admin_Key | Select-Object PSPath, IsInstalled, PSDrive | fl
}
}
}
# Check Registry Key - User Profile Key Exists
#
if ((Test-Path -Path $IE_ES_User_Key)) {
$URegistryValue=(Get-ItemProperty -Path $IE_ES_User_Key -Name IsInstalled).IsInstalled
if ($URegistryValue -eq "" -or $URegistryValue -ne 1) {
Write-Host `n$IE_ES_User_Key -BackgroundColor Black -ForegroundColor Green
Write-Host "`nIE Enhanced Security is Already Disabled for User ......"
write-host `n`nCurrently Registry Value is set to $URegistryValue `, No changes have been done.`n -
ForegroundColor Black -BackgroundColor White
[console]::Beep(600,800)
} elseif ($URegistryValue -eq 1) {
Write-Host "`nIE Enhanced Security is Currently Enabled for User ......"
Get-ItemProperty -Path $IE_ES_User_Key | Select-Object PSPath, IsInstalled, PSDrive | fl
Read-Host "Press Any Key..." | Out-Null
Write-Host "`nDisabling Now.. $IE_ES_Admin_Key `n`n##### Shown is the Updated Setting ####" -
ForegroundColor DarkYellow -BackgroundColor Black
[console]::Beep(600,800)
Set-ItemProperty -Path $IE_ES_User_Key -Name "IsInstalled" -Value 0 -Force
Get-ItemProperty -Path $IE_ES_User_Key | Select-Object PSPath, IsInstalled, PSDrive | fl
}
} else {
Write-Host "`nIE Enahanced Security Registry Keys in (Admin and User) - Is Not Configured"
Write-host "`n $IE_ES_Admin_Key `n $IE_ES_User_Key " -ForegroundColor Black -BackgroundColor
Cyan
Write-Host "`nReigstry Key Not Found!" -ForegroundColor White -BackgroundColor Red
[console]::Beep(600,700)
}
How To Disable IE Enhanced Security - PowerShell
3 | P a g e
PowerShell Output
In this example we will capture different possibilities of registry configured values;
Registry Key – Already Configured
If the registry key is already configured; below screenshot will be displayed.
Registry Key – Admin Profile Enabled
Registry key for Admin key that is configured as per the below Registry location;
HKLM:SOFTWAREMicrosoftActive SetupInstalled Components{A509B1A7-37EF-4b3f-8CFC-
4F3A74704073}
How To Disable IE Enhanced Security - PowerShell
4 | P a g e
Registry Key – User Profile Enabled
Registry key for User key that is configured as per the below registry location;
HKLM:SOFTWAREMicrosoftActive SetupInstalled Components{A509B1A8-37EF-4b3f-8CFC-
4F3A74704073}
Registry Key – Not Configured
If the system is not configured on both Admin and User registry key; Script will not modify registry key
and script will display message as per the below screenshot.
Note / Disclaimer: Modifying and revoking registry can result in system crash and system might not be
recoverable. This blog is for only informational or reading purposes only.

More Related Content

PDF
How To Check IE Enhanced Security Is Enabled Windows PowerShell
PDF
Windows PowerShell Basics - How To List PSDrive Info
PDF
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
PDF
How To Create Power Shell Function Mandatory Parameter Value
PDF
How To Construct IF and Else Conditional Statements
PDF
How To Check file exists and Delete PowerShell
PDF
Windows PowerShell Basics – How To Create powershell for loop
PDF
Install and Configure RSyslog – CentOS 7 / RHEL 7
How To Check IE Enhanced Security Is Enabled Windows PowerShell
Windows PowerShell Basics - How To List PSDrive Info
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
How To Create Power Shell Function Mandatory Parameter Value
How To Construct IF and Else Conditional Statements
How To Check file exists and Delete PowerShell
Windows PowerShell Basics – How To Create powershell for loop
Install and Configure RSyslog – CentOS 7 / RHEL 7

What's hot (20)

PDF
How To Install and Configure Open SSH Server on Ubuntu
PDF
How To List Nginx Modules Installed / Complied on CentOS 7
PDF
How To Install and Configure SNMP on RHEL 7 or CentOS 7
PDF
How To Connect Amazon AWS EC2 with Key Pair – Linux
PDF
How To View Current Execution Policy PowerShell
PDF
Nginx bind() to 0.0.0.0:9080 failed
PDF
How To Create PowerShell Function
PDF
How To Install and Configure Apache SSL on CentOS 7
PDF
Install Active Directory PowerShell Module on Windows 10
PDF
How To Configure Nginx Load Balancer on CentOS 7
PDF
How To Install and Configure GNome on CentOS 7
PDF
How to Upgrade Openfire on CentOS 7
PDF
How To Configure Amazon EC2 Security Groups
PDF
How To Connect To Active Directory PowerShell
PDF
Bash Script - How To Monitor Application Error Logs and Send Notification
PDF
How to Install and Configure Cacti on Linux
PDF
How To Create EBS Snapshot and Restore EBS Snapshot – Linux Instance
PDF
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
PDF
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
PDF
How to Change Hostname in CentOS 7 or RHEL 7
How To Install and Configure Open SSH Server on Ubuntu
How To List Nginx Modules Installed / Complied on CentOS 7
How To Install and Configure SNMP on RHEL 7 or CentOS 7
How To Connect Amazon AWS EC2 with Key Pair – Linux
How To View Current Execution Policy PowerShell
Nginx bind() to 0.0.0.0:9080 failed
How To Create PowerShell Function
How To Install and Configure Apache SSL on CentOS 7
Install Active Directory PowerShell Module on Windows 10
How To Configure Nginx Load Balancer on CentOS 7
How To Install and Configure GNome on CentOS 7
How to Upgrade Openfire on CentOS 7
How To Configure Amazon EC2 Security Groups
How To Connect To Active Directory PowerShell
Bash Script - How To Monitor Application Error Logs and Send Notification
How to Install and Configure Cacti on Linux
How To Create EBS Snapshot and Restore EBS Snapshot – Linux Instance
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
How to Change Hostname in CentOS 7 or RHEL 7
Ad

Viewers also liked (16)

PDF
How To Install and Configure Salt Master on Ubuntu
PDF
How To Protect SSH Access with Fail2Ban on RHEL 7
PDF
How To Configure SNMP Logging on RHEL 7
PDF
How To Install and Configure Screen on CentOS 7
PDF
Install telnet Linux
PDF
How To Install and Configure AWS CLI on RHEL 7
PDF
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
PDF
LSOF Command Usage on RHEL 7
PDF
How To Configure Apache VirtualHost on RHEL 7 on AWS
PDF
How to Install Configure and Use sysstat utils on RHEL 7
PDF
How To View Login History and Logout History on RHEL 7
PDF
How To Install OpenFire in CentOS 7
PDF
Batch script for nslookup range of ip address
PDF
Red Hat Satellite 6 - Automation with Puppet
PDF
How to Configure OpenFiler for NFS Share
PDF
How To Install and Use ABRT CLI on RHEL 7
How To Install and Configure Salt Master on Ubuntu
How To Protect SSH Access with Fail2Ban on RHEL 7
How To Configure SNMP Logging on RHEL 7
How To Install and Configure Screen on CentOS 7
Install telnet Linux
How To Install and Configure AWS CLI on RHEL 7
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
LSOF Command Usage on RHEL 7
How To Configure Apache VirtualHost on RHEL 7 on AWS
How to Install Configure and Use sysstat utils on RHEL 7
How To View Login History and Logout History on RHEL 7
How To Install OpenFire in CentOS 7
Batch script for nslookup range of ip address
Red Hat Satellite 6 - Automation with Puppet
How to Configure OpenFiler for NFS Share
How To Install and Use ABRT CLI on RHEL 7
Ad

More from VCP Muthukrishna (8)

PDF
How to Fix Duplicate Packages in YUM on CentOS 7
PDF
How To Connect to Active Directory User Validation
PDF
How To List Files on Remote Server - PowerShell
PDF
How To List Files and Display In HTML Format
PDF
How To Check and Delete a File via PowerShell
PDF
How To Setup SSH Keys on CentOS 7
PDF
How To Find Package Installation Date on RHEL 7
PDF
How To Reset root Password on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7
How To Connect to Active Directory User Validation
How To List Files on Remote Server - PowerShell
How To List Files and Display In HTML Format
How To Check and Delete a File via PowerShell
How To Setup SSH Keys on CentOS 7
How To Find Package Installation Date on RHEL 7
How To Reset root Password on CentOS 7

Recently uploaded (20)

PPTX
sap open course for s4hana steps from ECC to s4
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation theory and applications.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Cloud computing and distributed systems.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
sap open course for s4hana steps from ECC to s4
NewMind AI Weekly Chronicles - August'25 Week I
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
20250228 LYD VKU AI Blended-Learning.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Machine learning based COVID-19 study performance prediction
Chapter 3 Spatial Domain Image Processing.pdf
Understanding_Digital_Forensics_Presentation.pptx
Spectral efficient network and resource selection model in 5G networks
Encapsulation theory and applications.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Cloud computing and distributed systems.
Diabetes mellitus diagnosis method based random forest with bat algorithm
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

How To Disable IE Enhanced Security Windows PowerShell

  • 1. How To Disable IE Enhanced Security - PowerShell i | P a g e Table of Contents Overview.......................................................................................................................................................1 Applies To..................................................................................................................................................1 Pre-Requisites ...........................................................................................................................................1 PowerShell Script – Disable IE Enhanced Security........................................................................................1 Code Snippet.............................................................................................................................................1 PowerShell Output....................................................................................................................................3 Registry Key – Already Configured........................................................................................................3 Registry Key – Admin Profile Enabled...................................................................................................3 Registry Key – User Profile Enabled......................................................................................................4 Registry Key – Not Configured..............................................................................................................4
  • 2. How To Disable IE Enhanced Security - PowerShell 1 | P a g e Overview In this post we will walk-through the process of disabling Internet Explorer's Enhanced Security. By default registry key value of IsInstalled is set to “1”, which means is IE Enhanced Security configuration is “Enabled”. If the registry key value is set to “0” then IE Enhanced Security configuration is disabled. Applies To Tested on Windows 10, Windows 2008 R2 and Windows 2012. Pre-Requisites Launch PowerShell Command Console or PowerShell ISE. To run this script, Execution Policy should be set to either of these “AllSigned” or “RemoteSigned” or “Unrestricted”, you can get current execution policy by running the command; “Get-ExecutionPolicy”. Policy Type Purpose Restricted No scripts can be run. Windows PowerShell can be used only in interactive mode. AllSigned Only scripts signed by a trusted publisher can be run. RemoteSigned Downloaded scripts must be signed by a trusted publisher before they can be run. Unrestricted No restrictions; all Windows PowerShell scripts can be run. PowerShell Script – Disable IE Enhanced Security The script posted in this article will read the system's registry key and the value set for component and its configured value, if configuration is already disabled, it will display IsInstalled Registry key value which is set to “0” when the configuration is disabled. Code Snippet # # Define Environment Variables # Define Registry Key for Admin and Current User for IE Enhanced Security # $IE_ES_Admin_Key="HKLM:SOFTWAREMicrosoftActive SetupInstalled Components{A509B1A7- 37EF-4b3f-8CFC-4F3A74704073}" $IE_ES_User_Key="HKLM:SOFTWAREMicrosoftActive SetupInstalled Components{A509B1A8-37EF- 4b3f-8CFC-4F3A74704073}" # Check Registry Key - System Profile Key Exists # Clear-Host if ((Test-Path -Path $IE_ES_Admin_Key)) { $ARegistryValue=(Get-ItemProperty -Path $IE_ES_Admin_Key -Name IsInstalled).IsInstalled
  • 3. How To Disable IE Enhanced Security - PowerShell 2 | P a g e if ($IE_ES_Admin_Key -ne "") { if ($ARegistryValue -eq "" -or $ARegistryValue -ne 1) { Write-Host `n$IE_ES_Admin_Key -BackgroundColor Black -ForegroundColor Green Write-Host "`nIE Enhanced Security is Already Disabled for Admin ......" write-host `n`nCurrently Registry Value is set to $ARegistryValue `, No changes have been done. - ForegroundColor Black -BackgroundColor White [console]::Beep(600,800) } elseif ($ARegistryValue -eq 1) { Clear-Host Write-Host "`nIE Enhanced Security is Currently Enabled for Admin ......" Get-ItemProperty -Path $IE_ES_Admin_Key | Select-Object PSPath, IsInstalled, PSDrive | fl Read-Host "Press Any Key..." | Out-Null Write-Host "`nDisabling Now.. $IE_ES_Admin_Key `n`n##### Shown is the Updated Setting ####" - ForegroundColor DarkYellow -BackgroundColor Black [console]::Beep(600,800) Set-ItemProperty -Path $IE_ES_Admin_Key -Name "IsInstalled" -Value 0 -Force Get-ItemProperty -Path $IE_ES_Admin_Key | Select-Object PSPath, IsInstalled, PSDrive | fl } } } # Check Registry Key - User Profile Key Exists # if ((Test-Path -Path $IE_ES_User_Key)) { $URegistryValue=(Get-ItemProperty -Path $IE_ES_User_Key -Name IsInstalled).IsInstalled if ($URegistryValue -eq "" -or $URegistryValue -ne 1) { Write-Host `n$IE_ES_User_Key -BackgroundColor Black -ForegroundColor Green Write-Host "`nIE Enhanced Security is Already Disabled for User ......" write-host `n`nCurrently Registry Value is set to $URegistryValue `, No changes have been done.`n - ForegroundColor Black -BackgroundColor White [console]::Beep(600,800) } elseif ($URegistryValue -eq 1) { Write-Host "`nIE Enhanced Security is Currently Enabled for User ......" Get-ItemProperty -Path $IE_ES_User_Key | Select-Object PSPath, IsInstalled, PSDrive | fl Read-Host "Press Any Key..." | Out-Null Write-Host "`nDisabling Now.. $IE_ES_Admin_Key `n`n##### Shown is the Updated Setting ####" - ForegroundColor DarkYellow -BackgroundColor Black [console]::Beep(600,800) Set-ItemProperty -Path $IE_ES_User_Key -Name "IsInstalled" -Value 0 -Force Get-ItemProperty -Path $IE_ES_User_Key | Select-Object PSPath, IsInstalled, PSDrive | fl } } else { Write-Host "`nIE Enahanced Security Registry Keys in (Admin and User) - Is Not Configured" Write-host "`n $IE_ES_Admin_Key `n $IE_ES_User_Key " -ForegroundColor Black -BackgroundColor Cyan Write-Host "`nReigstry Key Not Found!" -ForegroundColor White -BackgroundColor Red [console]::Beep(600,700) }
  • 4. How To Disable IE Enhanced Security - PowerShell 3 | P a g e PowerShell Output In this example we will capture different possibilities of registry configured values; Registry Key – Already Configured If the registry key is already configured; below screenshot will be displayed. Registry Key – Admin Profile Enabled Registry key for Admin key that is configured as per the below Registry location; HKLM:SOFTWAREMicrosoftActive SetupInstalled Components{A509B1A7-37EF-4b3f-8CFC- 4F3A74704073}
  • 5. How To Disable IE Enhanced Security - PowerShell 4 | P a g e Registry Key – User Profile Enabled Registry key for User key that is configured as per the below registry location; HKLM:SOFTWAREMicrosoftActive SetupInstalled Components{A509B1A8-37EF-4b3f-8CFC- 4F3A74704073} Registry Key – Not Configured If the system is not configured on both Admin and User registry key; Script will not modify registry key and script will display message as per the below screenshot. Note / Disclaimer: Modifying and revoking registry can result in system crash and system might not be recoverable. This blog is for only informational or reading purposes only.