Blog - powershell

Swimburger
PowerShell logo

PowerShell Script: Scan documentation for broken links

- PowerShell
A lot of documentation will link to other locations on the web using URL's. Unfortunately, many URL's change over time. Additionally, it's easy to make typos or fat finger resulting in incorrect URL's. Here's a small PowerShell script you can run on your documentation repositories and will tell you which URL's are not resolving in a proper redirect or HTTP StatusCode 200
PowerShell Logo

PowerShell Snippet: Clearing Cloudflare Cache with Cloudflare's API

- PowerShell
Cloudflare provides a GUI to purge cache, but every action you can perform using the GUI, you can also do with Cloudflare's API. You could use the API to auto purge the cache whenever you update content in your CMS of choice, or purge the cache as part of your Continuous Delivery pipeline. Using PowerShell we'll interact with Cloudflare's API and purge their cache.
PowerShell logo

PowerShell Snippet: Crawling a sitemap

- PowerShell
Here's a PowerShell function that you can use to validate that all pages in your sitemap return a HTTP Status code 200. You can also use it to warm up your website, or ensure your website caching is warm after a cold boot. I personally use it as part of my Continuous Delivery pipeline to warm up my site and Cloudflare's cache.