$enderecoIp = $args[0]
$enderecoCompleto = "https://$enderecoIp"
$webRequest = [Net.WebRequest]::Create($enderecoCompleto)
try { $webRequest.GetResponse() } catch {}
$cert = $webRequest.ServicePoint.Certificate
Write-Host "Cert: $($cert)"
$bytes = $cert.Export([Security.Cryptography.X509Certificates.X509ContentType]::Cert)
set-content -value $bytes -encoding byte -path "$pwd\valido.cer"
$params = @{
    FilePath = "$pwd\valido.cer"
    CertStoreLocation = "Cert:LocalMachine\Root"
}
Import-Certificate @params