Windows: Check to which (Internet Explorer) Zone a file or path belongs to

Hi,

there is no GUI available to show to which Internet Explorer Zone a file belongs.

But there is a Powershell way to do so 🙂

Let use assume you have a script \\myFileServer.myDomain.org\pubic\myScript.ps1

PS D:\> [System.Security.Policy.Zone]::CreateFromUrl("\\myFileServer.myDomain.org\pubic\myScript.ps1")

SecurityZone
------------
    Intranet

These settings are set by the “Internet Control Panel” GUI. Start inetcpl.cpl => Security Tab

or by Policy. 1= Intranet

Computer Policy

PS D:\> Get-ChildItem -Recurse "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap"
Name                           Property
----                           --------
myDomain.org                    * : 1

PS D:\> Get-ItemProperty  "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMapKey\"
*.myDomain.org : 1

User Policy

PS D:\> Get-ChildItem -Recurse "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap"
Name                           Property
----                           --------
myDomain.org                    * : 1

PS D:\> Get-ItemProperty  "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMapKey\"
*.myDomain.org : 1

These are the pathes in the Group Policy Editor

Computer Configuration/Administrative Templates/Windows Components/Internet Explorer/Internet Control Panel/Site to zone assignment list
User Configuration/Administrative Templates/Windows Components/Internet Explorer/Internet Control Panel/Site to zone assignment list

If you have still problems running powershell scripts from that locations check if there is a zone identifier on a file

PS D:\> get-item \\myServer.myDomain.org\Share1\myScript.ps1 -Stream *
...
Stream     : Zone.Identifier
...

To remove them

PS D:\> Unblock-file \\myServer.myDomain.org\Share1\myScript.ps1 

Michael