I'm using the following one-liner to get a list of users who aren't disabled, and whose accounts expire, with some properties:
Get-ADUser -Filter {(Enabled -eq $true) -and (accountExpires -ne 0)} -Properties name, mail, c, physicalDeliveryOfficeName, telephoneNumber, manager, title, description | select-object name, mail, c, physicalDeliveryOfficeName, telephoneNumber, manager, title, description
It works, except it grabs everyone in my domain, not just the ones whose accounts expire as indicated. Why is it ignoring the accountExpires portion of the script?