Get the App
SLTechnology News&Howtos  ›  Servers  › 

Windows Server 2016-Command Line bulk Export AD user Information

Shulou Source: shulou.com Published: 2022-06-03 01:16:23 11月15日 Update

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.

Tags: Information users methods directories commands public work Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Linux Shulou Information Apple Microsoft