Share via


how to get registry key values for trusted sites

Question

Saturday, December 14, 2013 7:06 PM

$comp="Windows"
$key="hklm:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMapKey"

 $test=""


$test= Invoke-Command -computername $comp  -ScriptBlock {param($key)Get-ItemProperty $key} -Args $key

I am basically stuck on something that is probably simple but i cant work it out so i am hoping someone can help

i am trying to get the registry keys for the site to zone assignment from a remote machine so i can see the trusted site have taken affect the above code works but i have alot of data/properties i dont want see below ,how do i exclude these?

i cant select the properties i want either as the list of properties will be www.microsoft.com :2 

and all the other sites in the list

PSPath                                   : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMapKey
PSChildName                              : ZoneMapKey
PSDrive                                  : HKLM

All replies (1)

Saturday, December 14, 2013 7:41 PM ✅Answered | 1 vote

You'll probably want to read this article: http://blogs.technet.com/b/fdcc/archive/2011/09/22/internet-explorer-s-explicit-security-zone-mappings.aspx

Excerpt:

What About “ZoneMapKey”?

IT administrators trying to apply site-to-zone settings by directly manipulating registry values often discover two “ZoneMapKey” registry keys that appear to be more interesting than they actually are: specifically, HKCU\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMapKey and HKLM\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMapKey.  Values under these keys look like the site-to-zone assignments applied through group policy, and in fact they are.  However, these keys are not used directly by Internet Explorer, and if you directly set values there, they will have no effect.  The ZoneMapKey entries are just a temporary writing place for the Group Policy engine, which writes entries there as specified by Group Policy, and then parses them into corresponding ZoneMap subkey settings that are used by Internet Explorer.