Skip to content

Instantly share code, notes, and snippets.

Avatar

Sterling Hammer sahammer

View GitHub Profile
@sahammer
sahammer / Get-CFZones.ps1
Last active Jan 24, 2019
Simple PowerShell function to retrieve Cloudflare Zones on an account
View Get-CFZones.ps1
<#
.SYNOPSIS
Quick PowerShell function to obtain your CloudFlare Zones using the v4 API
.DESCRIPTION
This function is to obtain a list of zones on your CloudFlare account
You can then use the returned id for other CloudFlare API calls.
https://api.cloudflare.com/
.PARAMETER Token
Obtain your API token here: https://support.cloudflare.com/hc/en-us/articles/200167836-Where-do-I-find-my-Cloudflare-API-key-
.PARAMETER EMail
@sahammer
sahammer / Invoke-CFPurgeCache.ps1
Last active Jan 24, 2019
Simple PowerShell function to purge Cloudflare Cache
View Invoke-CFPurgeCache.ps1
<#
.SYNOPSIS
Quick PowerShell function to purge your CloudFlare Cache for a specific zone
.DESCRIPTION
This is a simple function to purge CloudFlare cache for a specific zone, can be integrated with an
Azure DevOps (or equivalent) pipeline.
.PARAMETER Token
Obtain your API token here:
https://support.cloudflare.com/hc/en-us/articles/200167836-Where-do-I-find-my-Cloudflare-API-key-
.PARAMETER EMail
You can’t perform that action at this time.