0

我试图与AWS + userdataAWS的Windows 2012 R2关闭IE增强的安全配置

我发现了一些功能,在线帮助我做到这一点推出的Windows 2012 R2实例时自动的Internet Explorer Enhanced Security Configuration禁用。当我在Server Manager下登记Local Server时,它说IE Enhanced Security Configuration已关闭。但是,当我启动IE时,它表示已启用。我怎样才能正确地禁用这个残疾人?

这里是我传递到用户数据用于AWS文件:

<powershell> 
    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  
    } 

    Disable-InternetExplorerESC 
</powershell> 

enter image description here

enter image description here

+0

它可能是重新启动后只能完全更新的那些设置之一? –

+0

您是否尝试将注册表项添加到GPO?这样他们申请登录管理员/用户。 – AngryCarrotTop

+0

@AngryCarrotTop对于Windows系统来说很抱歉。我不确定你在说什么= [ – Liondancer

回答

1

我有同样的问题,终于得到了这个工作使用下面的用户数据的脚本:

<powershell> 
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 -Force 
    Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 -Force 
    Remove-ItemProperty -Path $AdminKey -Name "IsInstalled" -Force 
    Remove-ItemProperty -Path $UserKey -Name "IsInstalled" -Force 
} 

Disable-InternetExplorerESC 
</powershell> 

The诀窍是实际上删除键,然后导致IE实际禁用ESC。

相关问题