Hello,
You are missing the -Expression
parameter. Also, the part for account expiration is incorrect. There should be no -eq
operator. Finally, it should be as follows:
$criteria = New-AdmCriteria "user" -Expression {adm-CustomAttributeInt2 -empty $false -and accountExpires -expired $false}
However, even with fixing the syntax, the criteria will not work. The thing is it is no possible to use Adaxes custom attributes in search criteria.