它一直在发生,我用Windows服务器启动了一个虚拟机,但由于IE的安全性,我无法访问Internet。有没有人有一个简单的PowerShell脚本来禁用IE安全?通过PowerShell在Windows Server上禁用IE安全性
18
A
回答
35
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
}
下降到.ps1文件,这
然后在提示符下键入一个时期,一个空间和文件路径 是这样的:
[PS 1] . C:\Users\Administrator\Desktop\YourPowerShellScript.ps1
然后就可以调用
[PS 1] Disable-InternetExplorerESC
9
的下面修饰增加了-Force参数:在提示命令以避免任何确认。系统提示我在确认要结束“资源管理器”过程时执行此操作。
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
Stop-Process -Name Explorer -Force
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 -Force
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 1 -Force
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 -Force
Write-Host "User Access Control (UAC) has been disabled." -ForegroundColor Green
}
Disable-UserAccessControl
Disable-InternetExplorerESC
相关问题
- 1. Windows Server 2008上的COM安全性
- 2. 在Windows Server 2012上为客户端禁用cmd和PowerShell
- 3. 如何通过代码禁用WCF的CustomBinding的安全性?
- 4. 使用powershell安装Windows Server 2012 Gui核心安装使用powershell
- 5. 通过PowerShell安装Windows服务
- 6. 使用Windows Server 2008 R2上的Com对象通过PowerShell禁用特定NIC上的IPV6?
- 7. 通过AJAX调用URL的安全性
- 8. WCF - 在nettcpbinding中禁用安全性(c#)
- 9. Windows网络适配器禁用通过Powershell启用
- 10. 在IIS7中禁用HttpHandler的安全性
- 11. 在本地主机上浏览时禁用集成的Windows安全性
- 12. 在AspNet MVC环境开发过程中禁用安全性
- 13. 禁用Windows Mobile安全功能
- 14. 在IE中清除cookie的安全性
- 15. 用于Windows 2000 Server的安全FTP
- 16. 在Windows 2000 Server上安装SQL Server 2005
- 17. WCF WebService安全性:如何在WebService上使用安全性?
- 18. 如何在Windows CE 5.0上安装安全证书不通过UI?
- 19. 使用安全密码通过Powershell发送电子邮件
- 20. 通过PowerShell将通讯组成员导入安全组
- 21. 关于通过Kerberos的Hadoop安全性
- 22. 通过javascript在IE中读取安全参数
- 23. 我可以通过spring安全性获得多个安全上下文吗?
- 24. 通过PowerShell在Vagrant机器中安装Windows certiciate
- 25. 如何在IE中查看XML时禁用安全警告?
- 26. 打开端口8080后安全EC2实例(Windows Server 2016)的安全性
- 27. PowerShell脚本在Windows Server 2003
- 28. SQL Server:安全性用户登录
- 29. 安装在Windows Server 2008上的SQL 2000中的全文搜索
- 30. 在Windows Server 2003上全新安装IIS 6会忽略'web.config'?
要禁用哪些内容?退出?保护模式? – 2012-02-20 21:01:55
是的,IE ESC(这里有几个字符可以让我发表这个评论????) – 2012-02-20 21:05:01