添加可信文件共享到internet explorer



我需要一点帮助,我需要将我的文件共享169.254.100.100Share添加到IE中的受信任站点,我以手动方式做到了,所以我知道这是有效的。但我也想在PS中这样做。我试图以不同的方式在注册表和GPO中添加它,但失败了。对于网站,它工作,但不是为服务器。有什么建议吗?

New-Item -Path '.SoftwarePoliciesMicrosoftWindowsCurrentVersionInternet SettingsZoneMap' -Name \169.254.100.100Share
New-ItemProperty -Path '.SoftwarePoliciesMicrosoftWindowsCurrentVersionInternet SettingsZoneMapDomains' -Name\169.254.100.100Share -Value 1 -PropertyType Dword

但这是失败的,这是好的,但我没有其他的想法。BR蒂姆

如果您要添加一个IP地址,它将进入Ranges子键而不是Domains子键,您还需要指定文件URL方案并填充ZoneMapKey。父子键可能不存在,在我的测试PC上,甚至ZoneMap也不存在。下面的示例应该进行扩展,以测试哪些已经存在,哪些需要创建。

Set-Location "HKCU:"
New-Item -Path 'SoftwarePoliciesMicrosoftWindowsCurrentVersionInternet Settings' -name ZoneMap
New-Item -Path 'SoftwarePoliciesMicrosoftWindowsCurrentVersionInternet SettingsZoneMap' -name Domains
New-Item -Path 'SoftwarePoliciesMicrosoftWindowsCurrentVersionInternet SettingsZoneMap' -name Ranges
New-Item -Path 'SoftwarePoliciesMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRanges' -name Range1
New-ItemProperty -Path 'SoftwarePoliciesMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange1' -Name ":Range" -Value "169.254.100.100"
New-ItemProperty -Path 'SoftwarePoliciesMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange1' -Name "file" -Value 2
New-Item -Path 'SoftwarePoliciesMicrosoftWindowsCurrentVersionInternet Settings' -name ZoneMapKey
New-ItemProperty -Path 'SoftwarePoliciesMicrosoftWindowsCurrentVersionInternet SettingsZoneMapKey' -Name "file://169.254.100.100" -Value "2"

你需要确保Range1不存在,并且在N不存在的地方找到RangeN。

最新更新