Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function check-cert
  2. {
  3. $cmd = "Certutil -crl"
  4. Invoke-Expression $cmd
  5. if($LASTEXITCODE -eq '0')
  6. {
  7. Write-Output $LASTEXITCODE
  8. }
  9. else
  10. {
  11. $output = $LASTEXITCODE
  12. $date = (Get-Date).ToString()
  13. $result = $date + " " + $output
  14. $result | Out-File "C:usersadminDocumentsPowershellcrllog.txt" -Append
  15. Write-Host "crl failed to publish"
  16. }
  17. }
  18.  
  19. check-cert
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement