From: EdTheDev Date: Sat, 8 Jan 2022 21:01:40 +0000 (-0600) Subject: Higher max. X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/commitdiff_plain/c74722e6002aa039a414fffe2fe25e2c67f84beb Higher max. --- diff --git a/psmodules/drivespace.psm1 b/psmodules/drivespace.psm1 index 19fdc5e..342311b 100644 --- a/psmodules/drivespace.psm1 +++ b/psmodules/drivespace.psm1 @@ -5,7 +5,10 @@ Find 10 largest files on the C drive. #> function Show-LargeFiles() { - Get-ChildItem c:\ -r| sort -descending -property length | select -first 10 name, Length, FullName + param( + [int]$Max=10 + ) + Get-ChildItem c:\ -r| sort -descending -property length | select -first $Max name, Length, FullName } <#