Active Directory PowerShell Flags & Options
The ActiveDirectory module for on-premises AD DS users, groups and computers.All Active Directory PowerShell pages
- Get-ADUser -Filter syntax: examples with -like, variables, dates and -PropertiesGet-ADUser -Filter takes a query string such as "Name -like 'Ann*'". Quote the values, add -Properties for extra attributes and use -SearchBase for one OU.
- Get-ADUser -Properties: get attributes beyond the default set (and why * is slow)Get-ADUser returns ten default properties; -Properties adds mail, Department, LastLogonDate or any LDAP attribute. Why -Properties * is slow in scripts.
- Get-ADUser -SearchBase and -SearchScope: search one OU, with or without sub-OUsGet-ADUser -SearchBase limits a search to one OU and its sub-OUs; -SearchScope OneLevel excludes sub-OUs. DN syntax, Users container and common errors.
- Get-ADUser -Server: query a specific domain controller or another domainGet-ADUser -Server targets a specific domain controller, another domain or a global catalog port. How the default server is chosen and ADWS requirements.