PowerShell Script to Get a Directory Total Size

后端 未结 4 1354
情话喂你
情话喂你 2021-02-05 09:45

I need to get the size of a directory, recursively. I have to do this every month so I want to make a PowerShell script to do it.

How can I do it?

4条回答
  •  再見小時候
    2021-02-05 10:15

    If you are interested in including the size of hidden and system files then you should use the -force parameter with Get-ChildItem.

提交回复
热议问题