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
- Host: GitHub
- URL: https://github.com/ckadluba/getappsvccertificates
- Owner: ckadluba
- Created: 2022-01-12T01:02:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-04T13:11:33.000Z (about 4 years ago)
- Last Synced: 2025-01-18T12:48:22.654Z (over 1 year ago)
- Topics: azure, powershell
- Language: PowerShell
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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