Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Sunday, October 27, 2013 10:57 PM
Hi
I it possible using PowerShell to add an url to the Internet Explorer "Local Intranet"?
Best regards
Bjorn
All replies (9)
Sunday, October 27, 2013 11:50 PM âś…Answered | 5 votes
The short answer is yes, you can, but how you accomplish it depends on whether you're using Group Policy to control these IE settings or not. Assuming that Group Policy is not involved, you can accomplish this by setting the following values in the registry. These can be done in either HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER, depending on whether you want the change to apply to all users of a machine or not:
Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\Domain>
<Protocol> = 1
For example, to add *.microsoft.com to the list for the current user (for both http and https):
if (-not (Test-Path -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoft.com'))
{
$null = New-Item -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoft.com'
}
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoft.com' -Name http -Value 1 -Type DWord
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoft.com' -Name https -Value 1 -Type DWord
Monday, October 28, 2013 10:08 AM
I've been searching high and low for this!
Thank you David!
Monday, October 28, 2013 11:51 AM
No problem! :)
Wednesday, May 7, 2014 12:03 PM
Hi David,
Please could you tell me what the script would be if I were to add it for all users instead of only the current user?
Thanks in advance.
Admin QuikView Solution for CRM 2013
Wednesday, May 7, 2014 1:50 PM | 2 votes
Just use HKLM: instead of HKCU:
Thursday, May 8, 2014 7:13 AM
Thanks David!
Admin QuikView Solution for CRM 2013
Thursday, May 15, 2014 11:14 AM
Hi David,
I tried using HKLM instead of HKCU (Server 2008R2), but it doesn't contain the "folder in Registry. Instead there is "EscDomains". So, I updated the script to use "EscDomains"; after executing it, it didn't give any error but I couldn't see the domain added to Intranet Sites in IE.
Any idea?
Admin QuikView Solution for CRM 2013
Thursday, May 15, 2014 1:32 PM
EscDomains only applies if you're running Internet Explorer with ESC ("Enhanced Security Configuration") enabled. You can just create the Domains key, if it's not already there.
Saturday, March 3, 2018 7:30 PM
Hi,
thank you for your help.
I just tested it and it works with HKCU and not with HKLM. Do you know why?