Folder size and date Using PowerShell instead of 3rd party mentioned below

sns 9,246 Reputation points
2023-08-29T16:24:47.78+00:00

Please assist on following 2:

1.

I want to all folders size ( which consist nested folders ) in side the main folder. I have found below one. But is there any Microsoft supported tool to achieve this.

https://www.partitionwizard.com/partitionmanager/powershell-get-folder-size.htmland

2.

and also looking for last date modified and created for all files and folders in side that main folder.

Please share if there is any script to get this.

Thank you.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,628 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. Ian Xue-MSFT 41,706 Reputation points Microsoft External Staff
    2023-08-30T08:58:43.5566667+00:00

    Hi,

    The Get-ChildItem cmdlet gets the files and directories in a specified location and the LastWriteTime is displayed by default.

    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.3

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.