When searching for specific AD accounts, you may have used Get-ADUser in the past, and filtered results with a filter parameter. Such filters can grow quite complex, though.
That’s why there is a shortcut for the most common AD searches. Simply use Search-ADAccount:
#requires -Modules ActiveDirectory Search-ADAccount -AccountDisabled Search-ADAccount -AccountExpired Search-ADAccount -AccountInactive
Search-ADAccount exposes parameters to search for the most common criteria.