Automate get-pendingrequest pki

Home Forums Scripting PowerShell Automate get-pendingrequest pki

Viewing 1 post (of 1 total)
  • Author
  • Avatar

    Hi Guys

    I am having some issues trying to get a script working that will check my CA for any pending requests, i’m using a pki module that can do this for me.

    Get-PendingRequest CA1,CA2

    Will show the following

    RequestID : 1262
    Request.RequesterName : pcid1
    Request.SubmittedWhen : 28/04/2017 4:48:37 AM
    Request.CommonName :
    CertificateTemplate : Web SSL
    RowId : 1262
    ConfigString : CA1
    Table : Request

    Now if i try and get that to email me when script is run i get a empty email.

    Send-Email.ps1 -To “[email protected]” -Subject “Pending Rewquest” -Body (Get-PendingRequest CA1,CA2)

    The send-email is;

    $smtpServer = “[email protected]
    $smtpFrom = “[email protected]
    $smtpTo = $to
    $messageSubject = $subject
    $messageBody = $body

    $smtp = New-Object Net.Mail.SmtpClient($smtpServer)

    Any ideas would be awesome

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.