locked
Get-ADUser cmdlet and codepage. RRS feed

  • Question

  • Hi team.

      I am using Get-ADUser cmdlet from PS to export some domain users properties, but I noticed that names with accents are exported using another code page, probably. How can I avoid this?

    Hope I was clear enough.


    Doria

    Tuesday, June 30, 2020 7:57 PM

Answers

  • How are the data exported? If you're using Export-CSV, try adding "-Encoding unicode" to the set of parameters for that cmdlet. The same parameter exists for the Out-File cmdlet.

    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    • Proposed as answer by Vector BCO Wednesday, July 1, 2020 12:04 PM
    • Marked as answer by dydoria Wednesday, July 1, 2020 12:36 PM
    Tuesday, June 30, 2020 9:08 PM

All replies

  • How are the data exported? If you're using Export-CSV, try adding "-Encoding unicode" to the set of parameters for that cmdlet. The same parameter exists for the Out-File cmdlet.

    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    • Proposed as answer by Vector BCO Wednesday, July 1, 2020 12:04 PM
    • Marked as answer by dydoria Wednesday, July 1, 2020 12:36 PM
    Tuesday, June 30, 2020 9:08 PM
  • Perfect!

    Thanks.


    Doria

    Wednesday, July 1, 2020 12:37 PM