1. 程式人生 > >【Windows Server 2019】將AD用戶匯出CSV

【Windows Server 2019】將AD用戶匯出CSV

process sha ane href sea 以及 https 位置 技術

問,我如何匯出我AD的用戶信息?

答,方法可以有好幾個,我舉個例子,通過 Get-AdUser (PoweShell)

Get-ADUser -Filter * -SearchBase "OU=XXX,DC=ianext,DC=com" -properties ,displayname,mail | select displayname,mail | export-csv -path c:\temp\test.csv -NoTypeInformation -Encoding "UTF8"

技術分享圖片

CSV的結果

技術分享圖片

Note:黃色標記的位置,你需要保持一致,以及你有創建文件與訪問的權限。還是就是參數的選定,你可以參考微軟文檔。( https://technet.microsoft.com/zh-tw/library/gg232586.aspx )

【Windows Server 2019】將AD用戶匯出CSV