Working on Users Report - Method invocation failed because....
Running the script and encountering this error
Working on Users Report... Method invocation failed because [System.Management.Automation.PSCustomObject] does not contain a method named 'Add'. At C:\temp\adreport.ps1:630 char:1
- $userphaventloggedonrecentlytable.Add($obj)
-
+ CategoryInfo : InvalidOperation: (Add:String) [], RuntimeException + FullyQualifiedErrorId : MethodNotFound
And then on the final output
Compiling Report... Get-HTMLContentDataTable : Cannot bind argument to parameter 'ArrayOfObjects' because it is an empty collection. At C:\temp\adreport.ps1:1175 char:45
- ... alReport.Add($(Get-HTMLContentDataTable $NewCreatedUsersTable -HideFo ...
-
~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidData: (:) [Get-HTMLContentDataTable], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyCollectionNotAllowed,Get-HTMLContentDataTable
Get-HTMLContentDataTable : Cannot bind argument to parameter 'ArrayOfObjects' because it is an empty collection. At C:\temp\adreport.ps1:1261 char:45
- ... alReport.Add($(Get-HTMLContentDataTable $NewCreatedUsersTable -HideFo ...
-
~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidData: (:) [Get-HTMLContentDataTable], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyCollectionNotAllowed,Get-HTMLContentDataTable
Save-HTMLReport : Cannot bind argument to parameter 'ReportContent' because it is null. At C:\temp\adreport.ps1:1308 char:32
- Save-HTMLReport -ReportContent $FinalReport -ShowReport -ReportName $ ...
-
~~~~~~~~~~~~- CategoryInfo : InvalidData: (:) [Save-HTMLReport], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Save-HTMLReport
No output file is created
I seem to be getting this error below any ideas?
Save-HTMLReport : Cannot bind argument to parameter 'ReportContent' because it is null. At line:1 char:32
- Save-HTMLReport -ReportContent $FinalReport -ShowReport -ReportName $ ...
-
~~~~~~~~~~~~- CategoryInfo : InvalidData: (:) [Save-HTMLReport], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Save-HTMLReport