Certificate remote request RRS feed

  • Question

  • Hi forum,

    You have helped me quite few times, so once again I'm asking smarter people if there's a way to :

    -remotly request for machine certificate?

    What I'm trying to do is to automate IIS web deployment, and one of steps is to create bindings to https and it's certificate.

    Template is set to autoenroll, permision are granted, locally I can request for cert and I'm getting it.

    But if I try to wrap this pice of script into invoke, then....nothing good come out of it.(error 80070057)

    $scriptToExecute =
    # certificates 1-way
    set-location 'cert:\localmachine\my'
    #$cert = get-certificate -template WebServer -credential $cred -dnsname test1.demo1.ad.local -url ldp: -subjectname ("cn="+"test1") -certstorelocation cert:\localMachine\My
    Invoke-Command -ComputerName hosts -Credential $Cred -ScriptBlock $scriptToExecute
    Thursday, June 4, 2020 10:00 AM

All replies