bwya77 / PSHTML-AD-Report

Create a high level interactive HTML report for you Active Directory environment using PowerShell
https://thelazyadministrator.com/2018/12/04/get-an-active-directory-interactive-html-report-with-powershell/
MIT License
376 stars 132 forks source link

list.add #15

Closed jasonlshelton closed 5 years ago

jasonlshelton commented 5 years ago

Getting the following error. New donwload, first run, no changes made. It did install the needed module.

At C:\Users\myname\Desktop\PSHTML-AD.ps1:876 char:3
+         $userphaventloggedonrecentlytable.Add($obj)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Add:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound
jasonlshelton commented 5 years ago

hmm, looks like I failed to post the whole error message, sorry about that

Method invocation failed because [System.Management.Automation.PSCustomObject] does not contain a method named 'Add'.
At C:\Users\jshelton\Desktop\PSHTML-AD.ps1:876 char:3
+         $userphaventloggedonrecentlytable.Add($obj)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Add:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound
TnTBass commented 5 years ago

Came here to report the same issue. I see it on the newest version (at the time of this reply).

bwya77 commented 5 years ago

Might be from empty table, can you test branch 1.0.3 https://github.com/bwya77/PSHTML-AD-Report/tree/1.0.3

bwya77 commented 5 years ago

After working with several redditors, we fixed it in v1.0.3. They were able to test and confirm. I have merged that branch with the master branch

Varjotiger commented 5 years ago

Good afternoon all, I am still experiencing this issue and have copied the code from the v1.0.3 branch and the master branch. Is anyone else still experiencing this issue?