With a new Windows 10 release  (1903) on the horizon, it’s always a good time to check for new stuff in you favourite tech. In our case that means checking in with Delivery Optimization to see if there are any new goodies in there. This time we weren’t disappointed 🙂
So into PowerShell land, and a quick

get-help deliveryoptimization

reveals not one, but TWO new cmdlets in the latest build – so here’s a quick rundown on what they do and why.

These two cmdlets actually work together – to give you some powerful capabilities with DO which were long asked for!

Sticky Content

The term Sticky Content is one that we use all the time here at 2Pint – and can be applied to any caching technology really. Simply put, it means that you can define content within the cache that will NOT be removed, when all around it is being nuked (kind of like ‘Persist in Cache’ in ConfigMgr). So for example – if you have a particular App or Windows Update – and you want to make sure that it hangs around, this is for you.

The cmdlet for this is


As you can see here – it’s pretty simple. You give it a FileID, and tell it how long you’d like that content to hang around.  The -Pin parameter is boolean , and the FileID is a string and that’s it!

So how do you get the FileID I hear you ask? Well you can just use the  get-deliveryoptimizationstatus cmdlet and check the output. In this example I just downloaded the Roblox game from the Microsoft Store and you can see the file ID at the top there.

Notice also that you can now see the Expiry date for this content – 3/23/2019. So let’s extend that and keep it for a month. All I need to do is run this:

This sets the IsPinned value to True and changes the date. And here’s the result..

So I’ve made sure that this important App will not be deleted by Delivery Optimization’s internal scavenging process (and that can be quite savage!), and will be vailable to Peers for a month. Kowabunga!

Whack that Content!

And finally – the other side of this coin is of course the long-overdue ability to delete the cache content. You could of course do that with the Disk Cleanup tool – but that is an ‘all or nothing’ delete and can’t be automated. We like automation don’t we? Enter Delete-DeliveryOptimizationCache

The good thing about the new delete cmdlet – as you can see above – is that you can delete an individual piece of content using the FileID. And that content that we ‘Pinned’ earlier? Yes you can delete that too using the -IncludePinnedFiles switch. (I still think it should have been -IncludeStickyFiles)

If you run this cmdlet without the -Force parameter, you will be prompted to confirm the deletion – so you have a chance to cancel…

So there we are! New, shiny, and supremely useful DO cmdlets are coming your way.  Get yourself the latest Windows Insider build and get Sticking 🙂


Phil 2Pint