Get folder size on Powershell is not a relatively straight forward task. But with the power lifting of Powershell on the background process, you don't have to sweat a lot to get things done. Getting folder size of a single directory is relatively straight forward in Powershell. But if you need to get folder size on all the directories on the root drive is quite a heavy task. Why is it a heavy task? Powershell needs to get the size of each file in the specified directory and get the total of all the files. So if you have a lot of folders and you want to get the size of each folder, Powershell will take some time to process. But if you need to monitor a single folder and check the folder size capacity daily then this one-liner code below will help. Get-ChildItem d:\Video -Recurse -Force | Measure-Object -Property Length -Sum ) . Sum / 1MB ) " + ' MB' Or use the alias: dir d:\Video -Recurse -Force | Measure-Obj...
Make the world a better place by sharing knowledge, ideas and anything that you can give that comes from the heart.