Before it even checks port status, the identifier should first just check to see if N is in the range of 1-65535, if not then it should just return $null without even checking port status. $true (exists & free) $false (exists but unavailable) $null (doesn't exist)