Powershell Script to export Active Directory users to CSV
- CSV檔案中文會亂碼:請使用上面Powershell 的程式,最後一段加入-encoding utf8 字樣,即可達成匯出中文字不會亂碼。
#Export CSV report
Export-Csv -Path $csvfile -NoTypeInformation -encoding utf8
- EXCEL直接打開完成的CSV會出現數字沒有補零的問題:原始檔案數字 0010 結果EXCEL中僅顯示 10 ,如何讓前面零出現
解決方法以EXCEL 2010為範例:
開始EXCEL –>資料—>從文字檔—>選擇要匯入的檔案
2.1

2.2

2.3
完成後收工。
資料同步於。