]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - psmodules/drivespace.psm1
Merge branch 'main' of github.com:edthedev/dotfiles into main
[dotfiles.git] / psmodules / drivespace.psm1
index 19fdc5e5b6648efb75c1737e5eb6547c5209f30c..b946f86d9f71531db914e71ae828d917e07aef4d 100644 (file)
@@ -5,7 +5,10 @@ Find 10 largest files on the C drive.
 
 #>
 function Show-LargeFiles() {
 
 #>
 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,5 +40,5 @@ $Files = Get-Job -Name "FileCollection" | Receive-Job
 Get-Job -Name "FileCollection" | Remove-Job
 }
 
 Get-Job -Name "FileCollection" | Remove-Job
 }
 
-Export-ModuleMember -Function Show-Drivespace 
+Export-ModuleMember -Function Show-DriveSpace 
 Export-ModuleMember -Function Show-LargeFiles
 Export-ModuleMember -Function Show-LargeFiles