PSHTML-AD-Report icon indicating copy to clipboard operation
PSHTML-AD-Report copied to clipboard

Working on Users Report - Method invocation failed because....

Open thetootall opened this issue 6 years ago • 3 comments

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
    

thetootall avatar Aug 29 '19 22:08 thetootall

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

thetootall avatar Aug 29 '19 22:08 thetootall

No output file is created

thetootall avatar Aug 29 '19 22:08 thetootall

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

cvtc11 avatar Sep 19 '19 22:09 cvtc11