Giter Club home page Giter Club logo

azureautomation / list-all-expiring-soon-certificates-in-azure-application-gateway Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 11 KB

Did you ever had developers or engineers coming to your desk in panic realizing their Azure Application Gateway' certificates expired without them knowing it in advance. Causing them downtime in their release pipeline, dev or worst, their production environment!

License: Other

PowerShell 100.00%
azureautomationrunbookgallery

list-all-expiring-soon-certificates-in-azure-application-gateway's Introduction

List all expiring soon certificates in Azure Application Gateway

The problematic

Did you ever had developers or engineers coming to your desk in panic realizing their Azure Application Gateway' certificates expired without them knowing it in advance. Causing them downtime in their release pipeline, dev or worst, their production environment!

 

What is proposed

Be proactive instead of reactive with this little script. Using this, you can get the list the certificates in your Azure Application Gateway that are soon due to expire. You have full control over the desired time period to be considered as expiring soon.

It is build so that you can take the output and do whatever you want with it after, whenever it's convert it to JSON, CSV, XML.

 

Overview

This is an overview of the usage you can do of the script Get-AzureAppGatewayExpiringCertificates

2020-06-19 - Added support to output ImpactedListeners & CertificateName members.

PowerShell Edit|Remove powershell Connect-AzAccount

Will list certificates if they expires 120 days from today

$audit = .\Get-AzureAppGatewayExpiringCertificates.ps1 -ExpiresInDay 180 -Verbose

$audit

VERBOSE: Iteration #1
VERBOSE: Sent top=100 skip=0 skipToken=
VERBOSE: Received results: 17 VERBOSE: 17

Name Value


SubscriptionId 00000000-0000-0000-0000-000000000000 Thumbprint 4956BCC058BCA4BCB1349357AB474CCDBB37C28AB ResourceGroup poc-prod-common SubscriptionName my-company-subscription NotAfter 3/4/2019 4:51:03 PM Cert [Subject]... Name poc-prod-common-ag CertificateName Wildcard_domain_com ImpactedListeners {Internal-Https-Demo API-Https-Demo Portal-Https-Demo … }

or if you want the information in JSON you can do:

$audit | ConvertTo-Json

Connect-AzAccount      # Will list certificates if they expires 120 days from today    $audit = .\Get-AzureAppGatewayExpiringCertificates.ps1 -ExpiresInDay 180 -Verbose    $audit    VERBOSE: Iteration #1                                                                                                                                                                VERBOSE: Sent top=100 skip=0 skipToken=                                                                                                                                              VERBOSE: Received results: 17  VERBOSE: 17    Name                           Value  ----                           -----  SubscriptionId                 00000000-0000-0000-0000-000000000000  Thumbprint                     4956BCC058BCA4BCB1349357AB474CCDBB37C28AB  ResourceGroup                  poc-prod-common  SubscriptionName               my-company-subscription  NotAfter                       3/4/2019 4:51:03 PM  Cert                           [Subject]...  Name                           poc-prod-common-ag  CertificateName                Wildcard_domain_com  ImpactedListeners              {Internal-Https-Demo API-Https-Demo Portal-Https-Demo … }      # or if you want the information in JSON you can do:   $audit | ConvertTo-Json 

 

Requirements

Tested with Azure PowerShell Az v1.x.x

Tested with Azure PowerShell Az.ResourceGraph module v0.7.6

TechNet gallery is retiring! This script was migrated from TechNet script center to GitHub by Microsoft Azure Automation product group. All the Script Center fields like Rating, RatingCount and DownloadCount have been carried over to Github as-is for the migrated scripts only. Note : The Script Center fields will not be applicable for the new repositories created in Github & hence those fields will not show up for new Github repositories.

list-all-expiring-soon-certificates-in-azure-application-gateway's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sarang46 wsmelton

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.