The if ($server -match "AMS" -or "BLU" -or "SIN") doesn't seem to work as expected. It executes /zoneadd but I want it to execute /zonedelete since $server bayphxdnsut02 does not match the if condition. Please advise.
foreach ($zone in $bosdzonelist)
{ $server = "bayphxdnsut02"
if ($server -match "AMS" -or "BLU" -or "SIN")
{dnscmd $server /zoneadd $zone /stub IPAddress /file "$zone.dns" | Out-File -append $results}
else
{dnscmd $server /zonedelete $zone /f | Out-File -Append $results}
}