Rem*_*our 6 powershell internet-explorer trusted-sites
我想知道是否可以使用PowerShell对Internet Explorer中的受信任域进行以下更改.
我想改变的Internet Explorer设置:
事实证明它是!
这就是我所做的:(以管理员身份运行powershell)
#Setting IExplorer settings
Write-Verbose "Now configuring IE"
#Add http://website.com as a trusted Site/Domain
#Navigate to the domains folder in the registry
set-location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
set-location ZoneMap\Domains
#Create a new folder with the website name
new-item website/ -Force
set-location website/
new-itemproperty . -Name * -Value 2 -Type DWORD -Force
new-itemproperty . -Name http -Value 2 -Type DWORD -Force
new-itemproperty . -Name https -Value 2 -Type DWORD -Force
#Navigate to the trusted domains folder in the registry:
#Go to registry folder for Trusted Domains
#Zone 2 in this case resembles the trusted domains (Or zones if you'd prefer)
Set-Location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\zones\2"
Run Code Online (Sandbox Code Playgroud)
现在,您将所有设置指出为值.诀窍是找到每个设置的正确值.在我的情况下,我发现了以下值:http: //support.microsoft.com/KB/182569(页面中间位置)
现在我们需要知道首选值是什么.在我的情况下,我发现值0是Enabled,1是Disabled,3是(如果支持)提示.
接下来很简单.
-ActiveX控件和插件:允许ActiveX过滤=启用(2702)
new-itemproperty . -Name 2702 -Value 0 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
-ActiveX控件和插件:允许以前未使用的ActiveX控件在没有提示的情况下运行=启用(1208)
new-itemproperty . -Name 1208 -Value 0 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
-ActiveX控件和插件:允许Scriptlets =启用(1208)
new-itemproperty . -Name 1209 -Value 0 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
-ActiveX控件和插件:ActiveX控件的自动提示=禁用(2201)
new-itemproperty . -Name 2201 -Value 3 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
-ActiveX控件和插件:二进制和脚本行为=启用(2000)
new-itemproperty . -Name 2000 -Value 0 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
- 在不使用外部媒体播放器的网页上显示视频和动画=启用(120A)
new-itemproperty . -Name 120A -Value 0 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
-ActiveX控件和插件:下载已签名的ActiveX控件=启用(1001)
new-itemproperty . -Name 1001 -Value 0 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
-ActiveX控件和插件:下载未签名的ActiveX控件=启用(1004)
new-itemproperty . -Name 1004 -Value 0 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
-ActiveX控件和插件:初始化和脚本未标记为脚本安全的ActiveX控件=启用(1201)
new-itemproperty . -Name 1201 -Value 0 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
- 仅允许已批准的域使用ActiveX而不提示=禁用(120B)
new-itemproperty . -Name 120B -Value 3 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
-ActiveX控件和插件:运行ActiveX控件和插件=启用(1200)
new-itemproperty . -Name 1200 -Value 0 -Type DWORD -Force
Run Code Online (Sandbox Code Playgroud)
-ActiveX控件和插件:标记为脚本安全的脚本ActiveX控件=启用(1405)
new-itemproperty . -Name 1405 -Value 0 -Type DWORD -Force
cls #Clear the screen
cd C:\Windows\System32 #Go back to default folder
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7429 次 |
最近记录: |