• Sign in
  • Sign up 
  • Welcome
  • FAQ
  • Switch to Night Mode
  • Stolen Accounts Recovery 
  • Change Account Password 
  • Vote for Witnesses 
  • Steem Proposals 
  • Developer Portal 
  • Steem Bluepaper 
  • SMT Whitepaper 
  • Steem Whitepaper 
  • Privacy Policy
  • Terms of Service
Homeby Witness Moecki
LoginSign up

Powershell Script - Export all domain users to CSV format

itai84 (25)in #microsoft • 8 years ago

In the following example the CSV will include only the field listed after select-object

Get-ADUser -Filter * -SearchBase 'OU=Users,OU=contoso,DC=com' -Properties * | Select-Object GivenName,Surname,enabled,LastLogonDate| Export-Csv C:\temp\users.csv

#powershell #exchange #script
8 years ago in #microsoft by itai84 (25)
$0.00
    2 votes
    • + jlufer
    • + itai84
    Reply 0