Windows Server 2016-Command Line bulk Export AD user Information
This chapter brings you how to export domain user list information through Powershell or ldifde command line, which is convenient for everyone to use in daily operation and maintenance work.
Export the list of all user information under the existing Staff directory by Powershell:
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
Export the list of all user information under the existing staff directory by ldifde:
Ldifde-f "c:\ alldbauser.ldf"-d "DC=staff,DC=azureyun,DC=com"-r objectClass=user-l "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"
Welcome to the official account of Wechat: Xiao Wen study Society.