How to export user information to CVS from AD Active Directory Power shell
PowerShell is an object-oriented programming language and interactive command line shell for Microsoft Windows. PowerShell was designed to automate system tasks, such as batch processing, and create systems management tools for commonly implemented processes. The PowerShell language is similar to Perl. PowerShell includes more than 130 standard command line tools for functions that formerly required users to create scripts in VB, VBScript or C#.
PowerShell offers a variety of ways to automate tasks, including:
- Cmdlets, which are very small .NET classes that appear as system commands.
- Scripts, which are combinations of cmdlets and associated logic.
- Executables, which are standalone tools.
- Instantiation of standard .NET classes.
PowerShell integrates with the .NET environment and can also be embedded within other applications. Over a hundred cmdlets are included that can be used separately or combined with others to automate more complex tasks. Users can also create and share cmdlets. PowerShell is available as a free download for Windows XP, Windows Server 2003 and Windows Vista. Support for PowerShell is built into Windows Server 2008 and Windows 7, where it is included as an optionally installed feature.
The following is a step by step procedure
- Boot windows server OS, on the desktop start menu type Microsoft development toolkit.
- Click on the Microsoft development toolkit and navigate though it until you see the Windows powershell and open it by running it as administrator.
- On the shell type : import-module ac*
- Click enter and then type : get-aduser -filter * -properties DispalyName, EmailAddress | Select DisplayName, EmailAddress | Export-csv c:userwithemailaddress.csv
- Head to your c: drive and you will find the csv file and export it to excel.