Get-ADUser information for multiple criteria

I was given the task to get AD user account information for the following: User must change password at next logon, for Enabled only accounts, and the modified dates of those accounts for the last 90 days. I have used this script

Import-Module ActiveDirectory
Get-ADUser -LDAPFilter “(pwdLastSet=0)” | Select SamAccountName,distinguishedName |
Export-CSV

for retrieving the User must change password at next logon, but then I have to use something like this

Get-ADUser -Filter {Enabled -eq $True} -Properties * | Sort-Object Name | Select-Object Name,DistinguishedName,Enabled,PasswordLastSet,Modified | Export-Csv

to get other criteria. How can I get all of the criteria into one script producing a single csv?

The filter can be updated to handle multiple items:

Get-ADUser -Filter {Enabled -eq $True -and PasswordNeverExpires -eq $False -and PasswordLastSet -gt 0} –Properties Name,DistinguishedName,Enabled,PasswordLastSet,Modified

Keep in mind that -Properties * returns ALL properties which is a much bigger query than just getting the properties you need. Above is not tested, but should be something like that.

I will give it a try. Thanks for your assistance!