This pull request fixes a potential division by zero. This can occur where the $totalcount variable in several functions contains zero and is subsequently used in the Write-Progress cmdlet. Fixed with a simple condition at the start of the loop for each function affected.
This pull request fixes a potential division by zero. This can occur where the $totalcount variable in several functions contains zero and is subsequently used in the Write-Progress cmdlet. Fixed with a simple condition at the start of the loop for each function affected.
if ($totalcount -eq 0) {break}