Hello
I am trying to filter a list of users based on their contents of the description field.
Return only users that don't have the word Enabled & a date of greater than the last 30 days in the description field.
This is what I have so far & is working in that it finds all users that don't have the word enabled in the field.
$30D = (get-date) - (new-timespan -Days 30)
foreach ($u in $users) { Get-QADUser $u -IncludedProperties SamAccountName | Where-Object {($_.Description -notmatch "Enabled")} | Select-Object SamAccountName,Description }
What I need to to do is read the date that is in the description field & if it greater than the 30days return the results.
Thank you in advance.
Steve