Azure Web App Free Space Check

Hello All,

Hope you are doing great!

Time to time you can receive something like this:

But, it’s pretty hard to understand what folder and where. For sure, you can install extension and check free space, but it will required web app restart, that not always possible:

So I wrote a pretty easy PowerShell script that will help you:

gci -force 'd:\home\'-ErrorAction SilentlyContinue | ? { $_ -is [io.directoryinfo] } | % { $len = 0 ; gci -recurse -force $_.fullname -ErrorAction SilentlyContinue | % { $len += $_.length }; $_.fullname, '{0} MB' -f ($len / 1Mb)}

You can change the folder name for different target.

Have fun with Azure Web App! πŸ™‚

Leave a comment