Hello, When there are not certificates, script return $bReturnOK (=$True). Shouldn't it return an integer 0,1,2,3 ? (example : $returnStateOK) `if (-Not $objCertificates) { Write-Output "No Certificates Found" exit $returnStateOK }`