I have a set of URLs and I want to check if they are an actual site. I have tried this code :
$Uri = $Site -as [uri]
                                            if($Uri){
                                            write-host $Uri
                                            }
but when I put in a site like https://acasdev.sharepoidnt.com/sites/migrations which isn't a correct site it still outputs it out as valid