Get-AdObject complex filters


hi all,

here command ad users in specified ou

get-adobject -filter {objectclass -eq "user"} -searchbase $customou

but need users entire domain filter "not in these ous"

any idea?

maybe this:

get-aduser -filter "distinguishedname -notlike "*,ou=badou,dc=somedomain,dc=com"


hope helps! jason



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...