sense-of-security / ADRecon

ADRecon is a tool which gathers information about the Active Directory and generates a report which can provide a holistic picture of the current state of the target AD environment.
https://senseofsecurity.com.au/
GNU Affero General Public License v3.0
1.64k stars 277 forks source link

[Bug fix] Adding Encoding option in Export-Csv. #17

Open shutingrz opened 4 years ago

shutingrz commented 4 years ago

In Japan, multi-byte characters are used.
However, Export-CSV cmdlet uses ASCII when there is no Encoding option.
Therefore, csv and xlsx output are garbled in countries that use multibyte characters.

Below is the description of Builtin Administrator in Japanese environment.

(snip),"S-1-5-21-1977510153-2366180416-4085323045-500","","???????/???????? (????? ?????)",(snip)

To solve the problem, use Default for the Encoding option of Export-Csv.
By using Default, it is possible to output with character code suitable for the environment.

As a result, it is output normally as follows.

(snip),"S-1-5-21-1977510153-2366180416-4085323045-500","","コンピューター/ドメインの管理用 (ビルトイン アカウント)"