Monday, June 10, 2013

Quick Script: Does server have a cert?


#Check for Cert
    if((get-item cert:\LocalMachine\My | get-childitem | ?{$_.Subject -imatch $fqdn}) -ne $null){
        Write-Host "[X] Certificate"
    } else {
        Write-Host "[ ] Certificate"
    } 

No comments: