• Sign in
  • Sign up 
  • Welcome
  • FAQ
  • Block Explorer 
  • Night Mode
  • Stolen Accounts Recovery 
  • Change Account Password 
  • Vote for Witnesses 
  • Hive Proposals 
  • OpenHive Chat 
  • Developer Portal 
  • Hive Whitepaper 
  • Privacy Policy
  • Terms of Service
logo
  • Posts
  • Proposals
  • Witnesses
  • Our dApps
LoginSign up

Powershell Script - Export all domain users to CSV format

itai84 (25)in #microsoft • 9 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
9 years ago in #microsoft by itai84 (25)
$0.00
    2 votes
    • jlufer
    • itai84
    Reply 0
    Sort:  
  • Trending
    • Trending
    • Votes
    • Age