Giter Club home page Giter Club logo

Comments (1)

rmbolger avatar rmbolger commented on May 26, 2024 1

Hi @EdificomSA, thanks for reaching out. The Submit-Renewal function will return PACertificate objects (the same thing returned by New-PACertificate and Get-PACertificate) for any certs that were renewed successfully. So anything that is missing from the output either had a problem or wasn't scheduled to renew yet.

As you noticed, the Install-PACertificate function doesn't return anything and is effectively swallowing the output from Submit-Renewal in your current script. While I might be able to add something like a -PassThru switch to Install-PACertificate, there are other ways you could accomplish the same task. There's a section in the tutorial with some sample code for renewal logic that might work better.

Here's how I might modify your existing code:

Submit-Renewal -AllOrders | ForEach-Object {
    # every item in this loop is a cert that was renewed successfully
    $cert = $_
    $cert | Install-PACertificate
    if ('example.com' -in $cert.AllSANs) {
        # deploy for example.com
    } elseif ('example.net' -in $cert.AllSANs) {
        # deploy for example.net
    } else {
        # deploy for everything else
    }
}

You could also avoid needing to call Install-PACertificate explicitly by adding the Install flag to your existing orders. For each order in each account, you can run the following:

Set-PAOrder -Install

from posh-acme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.