How to add a trusted site to web options in Windows 10

Copper Contributor

Hello. This is my first post on the forum, so let me introduce yourself. My name is Robert Gorajski and welcome everyone.


My first post applies to the possibility of adding a trusted site in network settings using PowerShell. I mean exactly about the following:





I tried to do this as follows:



set-location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" 
set-location ZoneMap\Domains new-item
new-itemproperty . -Name http -Value 2 -Type DWORD




Unfortunately, after adding in internet options, does not appear Can you suggest how to do it?


Thank you very much in advance.


1 Reply



OK partly I will answer myself, although I still do not know how to solve the problem to the end.

I sought by the record is in the case of my test computer in the key:



\HKEY_USERS\S-1-5-21-3419930908-1354286565-637230989-88540\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains



I see the key in regedit, unfortunately I do not see him in PowerShell



Get-ChildItem HKU:\ | Select-Object Name
Get-ChildItem : Cannot find drive. A drive with the name 'HKU' does not exist.
At line:1 char:1
+ Get-ChildItem HKU:\ | Select-Object Name
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (HKU:String) [Get-ChildItem], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand



Does any of you know why?