Get windows AD user

Get all user information in the windows AD

Get-ADUser -Filter * -Properties * -SearchBase "DC=staff,DC=azureyun,DC=com" |Select-Object name,SamAccountName,Givenname,surname,Displayname,title,mobile,CanonicalName,Created,Department,DistinguishedName,EmailAddress,homeMDB,mail,mailNickname,MemberOf,msExchCoManagedObjectsBL,msExchHomeServerName,PasswordLastSet,PrimaryGroup,proxyAddresses,UserPrincipalName,whenCreated,whenChanged,MobilePhone,telephoneNumber,employeeNumber,postalCode,company |Export-Csv C:\AllADUser20190226.csv -Encoding UTF8 –NoTypeInformation

Guess you like

Origin blog.51cto.com/ting2junshui/2437609