1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$target = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range" for($i = 1; $i -le 5; $i++) { Write-Output "${target}${i}" $x = Test-Path -LiteralPath "${target}${i}" Write-Output $x if (-not $x) { New-Item -Path "${target}${i}" -Force Set-ItemProperty -Path "${target}${i}" -Name "file" -Value 2 -Type DWord # -Value 1 ローカルイントラネット Set-ItemProperty -Path "${target}${i}" -Name ":Range" -Value "192.168.*.*" -Type String break } } |