Przemysław Kłys
Przemysław Kłys
@snd3r I am not sure how you test things but you should really get better testing env.  Also having strict checking means you can't have "problems" or non-existing variables...
Closed by accident. After some changes it seems to work now. You really should build a bit broken Test Env. I have 1 forest with 2 domains and 4 domain...
Another drawback of using ErrorAction Stop globally Without it:  With it:  It's like impossible to find out where it terminated.
1. In the first error, I can see a place where the error happens so I can easily check and eventually fix. In a second I've no clue where to...
Your change will check for the existence of the key and will execute the script every time for each of those values.  That's why I created Test-KeyVerifyBoth. Because it...
Also why you remove -Merge ? ``` Add-ToArrayAdvanced -List $Events -Element $FoundEvents -SkipNull -Merge ``` It actually merges two arrays. if you don't do that it may fail.
Test this on PastMonth, OnDay, PastQuarter.
Checking yes, but I mean even if the values are correct $ReportTimes.OnDay will return $True. Same as $ReportTimes.PastMonth will return $true and everything under this will execute. It's not about...
Ok. It's a way to do this. But then I need logger and other stuff to address my comments from above? Or you see it differently?
What I did is define $Script:Variable and I am checking for user input. If there is no user input I use that instead. That's what I did. My problem if...