I am wondering if there is a way to filter this:
Search-ADAccount -AccountInactive -DateTime ((get-date).adddays(-90)) -Usersonly
By adding pipeline:
| where-object {($_.samAccountName -notlike "*_ua1") -and ($ _.memberOf -like "*UserAdminL1 *")}
It seems like it freezes and do nothing.
Maybe there is a correct way to do this ?