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

  1. Boot windows server OS, on the desktop start menu type Microsoft development toolkit.
  2. Click on the Microsoft development toolkit and navigate though it until you see the Windows powershell and open it by running it as administrator.
  3. On the shell type : import-module ac*
  4. Click enter and then type : get-aduser -filter * -properties DispalyName, EmailAddress | Select DisplayName, EmailAddress | Export-csv c:userwithemailaddress.csv
  5. Head to your c: drive and you will find the csv file and export it to excel.
Like what you read? Give lewis malim a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.