From 49c420317734ad078b2f009ec490ce3538f71a7b Mon Sep 17 00:00:00 2001 From: EdTheDev Date: Fri, 1 Dec 2023 22:02:44 -0600 Subject: [PATCH] Update to find large files in a more targeted way --- psmodules/file_management.psm1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/psmodules/file_management.psm1 b/psmodules/file_management.psm1 index bbb6fa1..3622885 100644 --- a/psmodules/file_management.psm1 +++ b/psmodules/file_management.psm1 @@ -6,9 +6,10 @@ Find 10 largest files on the C drive. #> function Show-LargeFiles() { param( - [int]$Max=10 + [int]$Max=10, + [string]$path="C:\Users" ) - Get-ChildItem c:\ -r| sort -descending -property length | select -first $Max name, Length, FullName + Get-ChildItem $path -r | sort -descending -property length | select -first $Max name, Length, FullName } <# -- 2.47.3