I have multiple sites that I want to add to HKCU:Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\ I would rather do this with a Foreach loop so I don't have to run a single script individually.
if (-not (Test-Path -Path 'HKCU:Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\123.abc'))
{
New-Item -Path 'HKCU:Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\123.abc'
Set-ItemProperty -Path 'HKCU:Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\123.abc' -Name https -Value 2 -Type DWord
}
I cannot seem to figure out the ForEach part
$domains = '123.abc', 'xyz.abc', 'abc.abc'
ForEach ($domains in $domains) {
.....
here is where I'm a little lost.