Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Determine Size of Folder with PowerShell

$
0
0

Summary: Use Windows PowerShell to determine the size of a folder.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily get the size of a folder structure?

Hey, Scripting Guy! Answer Use a combination of Get-Childitem and Measure-Object. For example, to see the size of the C:\Foo folder
           structure in Windows PowerShell 5.0 or 4.0, use:

Get-Childitem C:\Foo –file –recurse | Measure-Object –property Length -sum


Viewing all articles
Browse latest Browse all 3333

Trending Articles