Edit
Contact us
Salocin Group Leaders in data and AI-enabled connected customer experiences
Edit Engineers of connected customer experiences
Join the Dots Independent, data-led media thinking for sustainable growth
Wood for Trees Optimisers of future fundraising performance
  • Home
  • Our services
    • Cloud solutions
    • Data science
    • Modern Data Platform
    • Privacy and AI compliance
  • Our partners
    • Microsoft
    • Apteco
    • Salesforce
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • About Salocin Group
    • Careers
  • Contact Salocin Group
  • Home
  • Who we are
    • B Corp
    • Careers
  • Our work
  • What we do
    • Intelligent data
    • Marketing technology
    • Transformational CRM
    • Our technology partners
    • Privacy review
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • Contact Edit
  • Home
  • Broadcast media
  • Digital media
  • Print
    • Direct mail
  • Data
    • Our work with Herdify
    • EPiC
  • Media agency
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • About Join the Dots
    • Careers
  • Contact Join the Dots
  • Home
  • Services
    • Actionable insight
    • Data discovery
    • Data engineering
    • Data hygiene
    • Privacy review
  • Products
    • InsightHub
    • Apteco
    • Microsoft
    • Data management
    • Consent and preference management
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • About Wood for Trees
    • Operating principles
    • Careers
  • Contact Wood for Trees
Blog

How to purge CDN files in an Azure Akamai profile

By Edit | 26 Oct 2016

We published this a long time ago…

Some of the content in this post might be out of date, and some images and links may no longer work.

Discover who we are and how we may be able to help you today:

Learn more

Using Content Delivery Networks (CDN) can help boost the performance of websites. They work by having distributed servers around the globe that serve your static content (such as images, javascript or CSS) to the end user from the server that is nearest to them.

CDN systems also can cache assets – they keep a copy of your images and don’t need to fetch them from the original source. This can raise challenges when you have assets that become out of date (for example, a banner with an offer), but you can still use a CDN and set it for a given timeframe, such as a one-week cache.

We had this challenge recently on a client project, for which we had some images in our Microsoft Azure CDN.

We were using the Akamai Profile – Akamai are a leader in the CDN world and were the provider of choice as they also offer new features such as HTTP2.

We had a lot of images (Over 20,000) that needed to be purged. However it seems that in the standard Azure portal, there isn’t a “purge all” option for Akamai and wildcards (/*) didn’t seem to be supported or honoured when we were using it.

After a lot of Googling and no joy, I contacted Azure support, who pointed me in the direction of a PowerShell command that would do the trick. To save you some time, I thought I would share it here!

Some notes on the variables:

  • the endpoint needs to the base name of the endpoint, not the full URL (eg. “my-cdn” rather than “my-cdn.azureedge.net”)
  • You can wild card through the PowerShell interface, so using “/my-images/*” will purge everything under the my-images folder
  1. Open Powershell in an elevated permission mode such as Administrator:

Connect to your Azure account using the following command:
Login-AzureRmAccount

  1. Enter the following variables with your correct settings:

$ResourceGroupName = “YourResourceGroupName”
$ProfileName = “YourCDNProfile”
$EndpointName = “YourCDNEndpoint”
$PurgeFolder = “ThePathOnYourCDNYouWishToPurge”

  1. Run the following command to purge your content:

Unpublish-AzureRmCdnEndpointContent -ResourceGroupName $ResourceGroupName -ProfileName $ProfileName -EndpointName $EndpointName -PurgeContent $PurgeFolder

Happy purging!

 

We published this a long time ago…

Some of the content in this post might be out of date, and some images and links may no longer work.

Discover who we are and how we may be able to help you today:

Learn more

Share this

  • Email
  • WhatsApp
  • LinkedIn
  • Facebook
  • X (Twitter)

More insights

AI isn’t going to take your job (unless you really want it to) 
Blog

AI isn’t going to take your job (unless you really want it to) 

By Edit | 18 Jun 2024
Customer relationship marketing: How generative AI is revolutionising engagement  
Blog

Customer relationship marketing: How generative AI is revolutionising engagement  

By Edit | 4 Apr 2024
Personalisation as a process
Blog

Personalisation as a process

By Edit | 8 Mar 2024
  • Privacy policy
  • Cookie policy
  • Ts&Cs
  • Report a concern

© 2025 Edit, part of Salocin Group Ltd. All rights reserved. Company no.: 0362​4881. VAT no.: 4208​34911.

Salocin Group Certified B Corporation | Cyber Essentials Certified | British Assessment Bureau, ISO 27001 Information Security Management
Salocin Group
Your cookie preferences

We use cookies to ensure this website functions properly, to analyse website traffic and for marketing purposes.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}