A PowerShell script providing a graphical user interface (GUI) for exporting Active Directory (AD) user data to CSV or Excel formats.
- PowerShell 5.1 or higher
- Active Directory PowerShell module
- Windows Server:
Add-WindowsFeature RSAT-AD-PowerShell
- Windows 10/11:
Add-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0"
- Excel installed for COM Object if exporting to Excel
Create a config.json
file in the same directory as the script with the following structure:
{
"DC": [
"domain-controller1.domain.com",
"domain-controller2.domain.com"
]
}
- Export AD user data to CSV or Excel formats
- Customizable property selection for export
- Multiple domain controller support
- Flexible export options and formatting
- Batch search functionality for multiple users
- Configure domain controllers in config.json
- Run the script:
.\ADTool.ps1
- For batch search, create a text file with one username per line:
jsmith\
jane.doe\
[email protected]\
[email protected]
Both SAMAccountName (jsmith) and UserPrincipalName ([email protected]) formats are supported.
- The script creates a log file (ADExport.log) for troubleshooting
- Failed batch exports are logged separately
- Supports both single and batch user exports
- Export formats: Excel (.xlsx) and CSV (.csv)