I thought it would have been to alter / remove the switch at the beginning : $Sort = "Size", $Descending, But at the end of the code there is the line in the html table formatting : #Create the report and save it to a file $HTML = $Report | Select 'Folder Name', Owner, 'Created On', 'Last Updated', Size | Sort $SortBy -Descending : $Descending | ConvertTo-Html -PreContent $Pre -PostContent $Post -Head $Header | Set-AlternatingRows -CSSEvenClass even -CSSOddClass odd | Out-File $ReportPath \ FolderSizes. com / scripts / show / 1738-get-foldersizes This is great and outputting to a html is a bonus ! However, I cannot seem to make the report sort on Size column showing largest folders to smallest. Powershell Hi I have found the following from this forum to show a report of the folder sizes in a given path.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |