Change Internet Explorer Security Settings for Trusted Domains Using Powershell

I was wondering if it is possible to make the following changes for trusted domains in Internet Explorer using PowerShell.

Internet Explorer settings I want to change:

  • Add http://website.com/ as a trusted site
  • Allow ActiveX Filtering = Enable
  • Allow start of previously unused ActiveX controls without prompt = Enable
  • Allow scripts = Enable
  • Automatic prompt for ActiveX controls = Disable
  • Binary and script behaviors = Enable
  • Display video and animation on a web page that does not use an external media player = Enable
  • Download signed ActiveX controls = Enable
  • Download unsigned ActiveX controls = Enable
  • Initialize and script ActiveX controls are not marked as safe for scripts = Enable
  • Allow only allowed domains to use ActiveX without prompt = Disable
  • Launch ActiveX controls and plugins = Enable
  • Script ActiveX controls marked as safe for scripts = Enable
+6
source share
1 answer

Turns out it was!

Here is what I did: (Run powershell as administrator)

#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" 

Now you have all your settings indicated as values. The trick is to find the right values ​​for each setting. In my case, I found the values ​​at: http://support.microsoft.com/KB/182569 (a bit halfway on the page)

Now we need to know what are the preferred values. In my case, I found that the value 0 is enabled, 1 is disabled, and 3 is (if supported).

Further it is quite simple.

-ActiveX controls and plugins: Allow ActiveX filtering = Enable (2702)

 new-itemproperty . -Name 2702 -Value 0 -Type DWORD -Force 

-ActiveX-controls and plugins: allow the launch of previously unused ActiveX controls without prompt = Enable (1208)

 new-itemproperty . -Name 1208 -Value 0 -Type DWORD -Force 

-ActiveX controls and plugins: Allow Scriptlets = Enable (1208)

 new-itemproperty . -Name 1209 -Value 0 -Type DWORD -Force 

-ActiveX-controls and plugins: automatic prompt for ActiveX controls = disable (2201)

 new-itemproperty . -Name 2201 -Value 3 -Type DWORD -Force 

-ActiveX controls and plugins: Binary and script behaviors = Enable (2000)

 new-itemproperty . -Name 2000 -Value 0 -Type DWORD -Force 

-Disable video and animation on a web page that does not use an external media player = Enable (120A)

 new-itemproperty . -Name 120A -Value 0 -Type DWORD -Force 

-ActiveX controls and plugins: Download signed ActiveX controls = Enable (1001)

 new-itemproperty . -Name 1001 -Value 0 -Type DWORD -Force 

-ActiveX controls and plugins: Download unsigned ActiveX controls = Enable (1004)

 new-itemproperty . -Name 1004 -Value 0 -Type DWORD -Force 

-ActiveX controls and plugins: Initialize and script ActiveX controls are not marked as script-safe = Enable (1201)

 new-itemproperty . -Name 1201 -Value 0 -Type DWORD -Force 

- allow allowed domains to use ActiveX without invitation = disable (120B)

 new-itemproperty . -Name 120B -Value 3 -Type DWORD -Force 

-ActiveX controls and plugins: Launch ActiveX controls and plugins = Enable (1200)

 new-itemproperty . -Name 1200 -Value 0 -Type DWORD -Force 

-ActiveX controls and plugins: script ActiveX controls marked as safe for scripts = Enable (1405)

 new-itemproperty . -Name 1405 -Value 0 -Type DWORD -Force cls #Clear the screen cd C:\Windows\System32 #Go back to default folder 
+7
source

Source: https://habr.com/ru/post/979277/


All Articles