Still new to powershell, so basic things can trip me up sometimes. I've been using a couple of filters against our Active Directory Tenant. Both run fine individually, but when combining the two, the command runs but fails to return any results. I know there are absolutely users in our tenant which match the filters, so I'm wondering where I've gone wrong. Hence me reaching out here for help!
$daysInactive = [DateTime]::Today.Adddays(-30)
Get-ADUser -Filter "Enabled -eq 'True' -and passwordlastset -le '$daysInactive'"
Any pointers on where I'm going wrong with the above would be appreciated.