How to export Active Directory users, and save in a worksheet in excel.

Welcome Forums General PowerShell Q&A How to export Active Directory users, and save in a worksheet in excel.

This topic contains 6 replies, has 3 voices, and was last updated by

Jon
 
Participant
7 months, 3 weeks ago.

  • Author
    Posts
  • #97269

    Participant
    Points: 0
    Rank: Member

    My question is to know how to export Active Directory users, and save in a worksheet in excel. I used this command:

    dsquery user domainroot |dsget user -display -office -loscr > C:\Arquiv.csv

    But when it generates the table, it appears with the files out of order and messy.

  • #97317

    Participant
    Points: 155
    Helping Hand
    Rank: Participant

    You might start with learning the very basics of Powershell and even maybe learning how to use an internet search engine.

    For Powershell I could recommend some of the links shared in this forum post: Beginner Sites and Tutorials.

  • #97320

    Participant
    Points: 0
    Rank: Member

    First of all, this question was for those who know how to answer, if you do not know, I ask you not to talk nonsense.

  • #97323

    Participant
    Points: 155
    Helping Hand
    Rank: Participant

    I know exactly how to do what you asked but your question shows that you didn't even spend any effort at all to find an answer by yourself. What you aksed has been asked and answered thousand times already. We do not write ready to use code on request here. If you have specific question to a particular piece of code you wrote you're welcome to post this piece of code here and ask a question to that code and maybe to the errors you get.

  • #97326

    Participant
    Points: 0
    Rank: Member

    Thank you,
    Could you tell me where I can learn more?

  • #97329

    Participant
    Points: 155
    Helping Hand
    Rank: Participant

    I already did in my first answer. So you didn't even read my answer completely. :-/

  • #97332
    Jon

    Participant
    Points: 25
    Rank: Member

    Check out these cmdlets

    get-aduser

    Export-CSV

The topic ‘How to export Active Directory users, and save in a worksheet in excel.’ is closed to new replies.