Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am philskents on github.
  • I am philskents (https://keybase.io/philskents) on keybase.
  • I have a public key ASAj7vIIrLy-7tHfaIlKmQG0F65VB_2iNWz-BLiAQyPHqQo

To claim this, I am signing this object:

@philskents
philskents / gist:2ad54e1dbe1e852df119683eca3155ba
Created March 19, 2017 00:49
Update-AzureSSLCertificate
$AppGW = Get-AzureRmApplicationGateway -Name “MyAppGw” -ResourceGroupName “MyResourceGroup”
$Cert = Set-AzureRmApplicationGatewaySslCertificate -ApplicationGateway $AppGW -Name “CertName” -CertificateFile “C:\Path\To\Cert.pfx" -Password “Password”
Set-AzureRmApplicationGateway -ApplicationGateway $AppGW
<#
.Synopsis
This script will delete all blobs from the specified container over a certain age.
.DESCRIPTION
When given the necessary storage account information this script will find any blobs over the given age in days and
remove them. If the job fails it will send an email to the specified recipient.
This script is designed to be executed as a scheduled task.
.EXAMPLE
.\Remove-OldAzureStorageBlob.ps1 -storageAccountName foo -storageAccountKey bar -containerName backups -age 30 -errorSMTPServer mymail.domain.com -errorSourceAddress alerts@domain.com -errorDestAddress me@domain.com
.NOTES