# Returns the current setting level for each Internet Explorer security zone # Run on Windows 7 Try { for ($x=0; $x -le 4; $x++) { $path=Get-Item HKCU:\"Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\$x" foreach ( $Item in $path) { write-host "Display name is" $Item.GetValue("DisplayName") write-host "Current level is" $Item.GetValue("CurrentLevel") write-host } } write-host "Successfully passed" exit 0 } Catch { write-host "Failure" exit 1001 }