]> apps.delaporte.us Git - dotfiles.git/blob - psmodules/drivespace.psm1
Typo
[dotfiles.git] / psmodules / drivespace.psm1
1 <#
2 .SYNOPSIS
3
4 Find 10 largest files on the C drive.
5
6 #>
7 function Show-LargeFiles() {
8 Get-ChildItem c:\ -r| sort -descending -property length | select -first 10 name, Length, FullName
9 }
10
11 <#
12 .SYNPOSIS
13
14 Display the free space on the C drive.
15
16 #>
17 function Show-Drivespace() {
18 Get-PSDrive C | Select-Object Used,Free | ForEach {
19 Write-Host "Free space GB: " ($_.Free / 1GB)
20 Write-Host "Used space GB: " ($_.Used / 1GB)
21 }
22 }
23
24 Export-ModuleMember -Function Show-Drivespace
25 Export-ModuleMember -Function Show-LargeFiles