4 Find 10 largest files on the C drive.
7 function Show-LargeFiles() {
8 Get-ChildItem c:\ -r| sort -descending -property length | select -first 10 name, Length, FullName
14 Display the free space on the C drive.
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)
24 Export-ModuleMember -Function Show-Drivespace
25 Export-ModuleMember -Function Show-LargeFiles