Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Powershell exports the properties of the AD account specified in the CSV file

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Sometimes when we export AD user attributes, we do not need to export all users, we may only need to export the attribute information of users in a specific user list. For the user list provided by the demand side, we can put the user name in the CSV. Read attributes one by one # export all user attributes in CSV $username=Import-Csv C:\ userinfo.csvforeach ($I in $username) {Get-ADUser $i.name-Properties * | `user c:\ alluser.csv-NoTypeInformation-Encoding Default} # Export some user attributes in CSV $username=Import-Csv C:\ userinfo.csvforeach ($I in $username) {Get-ADUser $i.name-Properties * | select SamAccountName,Name,Department | `Export-Csv c:\ alluser.csv-NoTypeInformation-Encoding Default}

Welcome to scan my official Wechat account for more IT information:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report