If you want to add the domain name to the trusted site list in the IE browser then you could refer to the Powershell script example below.
Set-Location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains"
New-Item test.com
Set-Location test.com
New-ItemProperty . -Name http -Value 2 -Type DWORD
If you want to add the IP address to the trusted site list in the Ie browser then you could refer to the Powershell script example below.
Set-Location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges"
New-Item Range1 # Modify it if it is exists#
Set-Location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range1" #Modify the path, if you modify the Range key in line above#
New-ItemProperty . -Name ":Range" -Value "129.0.0.1"
New-ItemProperty . -Name "file" -Value 2
Note:
- If you receive an error that
A key in this path already exists
then you need to modify the key name (e.g. Range2, Range3, etc.)
- After you modify the Key name(in 2nd line), you need to modify the path(in 3rd line) according to the new key name.
Further, you could modify the above example as per your requirements.