An open API service indexing awesome lists of open source software.

https://github.com/ckadluba/getappsvccertificates

A PowerShell Script to find expired Azure App Service Certifiactes
https://github.com/ckadluba/getappsvccertificates

azure powershell

Last synced: about 2 months ago
JSON representation

A PowerShell Script to find expired Azure App Service Certifiactes

Awesome Lists containing this project

README

          

# GetAppSvcCertificates

A script to find expired or specific certificates on all Azure app services (or ASEs) within a specified subscription or resource groups. The script returns a collection of certificate info objects containing the name, thumbprint, hostname bindings, keyvault info if applicable, ASE and web app SSL bindings and the resource group for all found certificates.

# Usage
```
Get-AppSvcCertificates -Subscription [-ResourceGroups ] [-ExpiresBefore ] [-Thumbprints ]
```

# Examples

Find all certificates in 'MySubscription' and write ouput to file certs.csv

```powershell
.\Get-AppSvcCertificates.ps1 -Subscription "MySubscription" | ConvertTo-Csv -Delimiter ';' | Out-File certs.csv
```

Find all certificates in resource groups 'MyResGroup1' and 'MyResGroup2'.

```powershell
.\Get-AppSvcCertificates.ps1 -Subscription "MySubscription" -ResourceGroups @("MyResGroup1", "MyResGroup2")
```

Find all certificates that expire before February 2022.

```powershell
.\Get-AppSvcCertificates.ps1 -Subscription "MySubscription" -ExpiresBefore "2022-02-01"
```

Find certificate with thumbprints '4CEDFA18AB7018C0F8741AD6049D5AE4A29C5F8E' and '5AACFE71AB4BEF90F8741AD2349D5BCEA21C5BCE'.

```powershell
.\Get-AppSvcCertificates.ps1 -Subscription "MySubscription" -Thumbprints @("4CEDFA18AB7018C0F8741AD6049D5AE4A29C5F8E", "5AACFE71AB4BEF90F8741AD2349D5BCEA21C5BCE")
```

# Prerequisites

* PowerShell 7
* PowerShell Az Module