Hi
I think I cracked it, so simple and I missed the trick completely! I just added in multiple Where-Object cmd's.
Get-QADUser -sizelimit 0 | Where-Object {$_.lastLogonTimeStamp -le $userlimit} | Where-Object {$_.DN -notlike "*sale*"} | Where-Object {$_.DN -notlike "*maternity*"} | Select samAccountName, lastLogonTimeStamp, dn | Export-CSV "c:\userLogin.csv" -notypeinformation
There maybe a more streamline, program friendly way of doing this, but it works!
Cheers