EvotecIT / PSWinReporting

This PowerShell Module has multiple functionalities, but one of the signature features of this module is the ability to parse Security logs on Domain Controllers providing easy to use access to AD Events.
MIT License
705 stars 70 forks source link

Getting error when I specify a different time #44

Closed kungfoome closed 5 years ago

kungfoome commented 5 years ago

If i run something like this:

Find-Events -Report ADGroupMembershipChanges -DatesRange Last3days -Servers 'SRV01', SRV02' | Format-Table -AutoSize

And then run it like:

Find-Events -Report ADGroupMembershipChanges -DatesRange Last7days -Servers 'SRV01', SRV02' | Format-Table -AutoSize

I get an error

Get-ServersList : Cannot process argument transformation on parameter 'Dates'. Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Collections.IDictionary".
At C:\Program Files\WindowsPowerShell\Modules\PSWinReportingV2\2.0.6\PSWinReportingV2.psm1:261 char:312
+ ... sList -Definitions $Definitions -Target $Target -Dates $Dates -Quiet: ...
+                                                            ~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-ServersList], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-ServersList
PrzemyslawKlys commented 5 years ago
Install-Module PSWinReportingv2 -Force

Sorry about that. Another bite in the ass for not clearing up variables. Should be fixed now.