From: EdTheDev Date: Mon, 17 May 2021 03:52:19 +0000 (-0500) Subject: Merge. X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/commitdiff_plain/ff4bd2116c84600a2a5c981d06174eb792ff52a4?hp=--cc Merge. --- ff4bd2116c84600a2a5c981d06174eb792ff52a4 diff --cc psmodules/drivespace.psm1 index 59feb96,361ee23..19fdc5e --- a/psmodules/drivespace.psm1 +++ b/psmodules/drivespace.psm1 @@@ -21,6 -21,22 +21,21 @@@ function Show-Drivespace() } } + function Show-DrivespacePretty() { + Start-Job -Name "FileCollection" -ScriptBlock { Show-Drivespace } + While((Get-Job -Name "FileCollection").State -eq "Running") { + Write-Progress -Activity "Collecting Files..." -PercentComplete $x + If($x -eq 100){ + $x = 1 + } + Else{ + $x += 1 + } + } + Write-Progress -Activity "Collecting Files..." -Completed + $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-LargeFiles