Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function check-cert
- {
- $cmd = "Certutil -crl"
- Invoke-Expression $cmd
- if($LASTEXITCODE -eq '0')
- {
- Write-Output $LASTEXITCODE
- }
- else
- {
- $output = $LASTEXITCODE
- $date = (Get-Date).ToString()
- $result = $date + " " + $output
- $result | Out-File "C:usersadminDocumentsPowershellcrllog.txt" -Append
- Write-Host "crl failed to publish"
- }
- }
- check-cert
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement