I noticed an error when running the script on a DC with a single user who has a password that doesn't expire.
[*] Password Information Audit
Method invocation failed because [Microsoft.ActiveDirectory.Management.ADPropertyValueCollection] does not contain a
method named 'op_Division'.
At C:\Users\anon\Desktop\AdAudit.ps1:356 char:9
...
I've resolved this by replacing the original line as below:
Original; $totalcount = $nonexpiringpasswords.count
New; $totalcount = ($nonexpiringpasswords | Measure-Object | Select-Object Count).count
The same count approach is used in several other locations. I've replaced each with the above method in this request.
I noticed an error when running the script on a DC with a single user who has a password that doesn't expire.
[*] Password Information Audit Method invocation failed because [Microsoft.ActiveDirectory.Management.ADPropertyValueCollection] does not contain a method named 'op_Division'. At C:\Users\anon\Desktop\AdAudit.ps1:356 char:9
...
I've resolved this by replacing the original line as below: Original; $totalcount = $nonexpiringpasswords.count New; $totalcount = ($nonexpiringpasswords | Measure-Object | Select-Object Count).count
The same count approach is used in several other locations. I've replaced each with the above method in this request.