phillips321 / adaudit

Powershell script to do domain auditing automation
https://www.phillips321.co.uk
374 stars 100 forks source link

fixed potential division by zero condition #12

Closed fuggles-5555 closed 3 years ago

fuggles-5555 commented 3 years ago

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}