hello permission to ask about how to make a report based on time span, in my case, I want to create a report of the recently created user but the result of my script execution doesn't show anything.
here is the script from my code:
`# Get parameter values
$str = "%param-str%"
$end = "%param-end%"
$span = New-TimeSpan -Start $str -End $end
# Search filter
$filterUsers = "(&(sAMAccountType=805306368)(|(!(msExchRecipientTypeDetails=*))(!(msExchRecipientTypeDetails:1.2.840.113556.1.4.804:=7276219883574))))"
$filterCreatedAfter = "(whenCreated>=$span)"
$filter = "(&" + $filterUsers + $filterCreatedAfter + ")"
$Context.DirectorySearcher.AppendFilter($filter)
# Generate report
$Context.Items.Add($Context.DirectorySearcher)`
Output Script: