X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/blobdiff_plain/79bacfc9724b7583b890f3d9388985a0e6343184..2f602aa8a7169a9d04bbd097654c0a8aea677341:/psmodules/drivespace.psm1?ds=sidebyside diff --git a/psmodules/drivespace.psm1 b/psmodules/drivespace.psm1 index 361ee23..b946f86 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 } <# @@ -37,6 +40,5 @@ $Files = Get-Job -Name "FileCollection" | Receive-Job Get-Job -Name "FileCollection" | Remove-Job } -Export-ModuleMember -Function Show-Drivespace -Export-ModuleMember -Function Show-DrivespacePretty +Export-ModuleMember -Function Show-DriveSpace Export-ModuleMember -Function Show-LargeFiles