枚举电子邮件列表中的用户列表 [英] Enumerating a list of users from an email list

查看:50
本文介绍了枚举电子邮件列表中的用户列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Excel电子表格中获得了电子邮件地址列表,并且需要使用PowerShell从AD获取用户的登录ID,名字,姓氏。 我是PowerShell的新手,需要一些帮助。 谢谢

I have been given a list of email addresses in and Excel spreadsheet  and need to get the user's LogonID, First Name , Last Name from AD using PowerShell.  I'm new to PowerShell and need some help.  Thank You

推荐答案

您好,

首先,将您的Excel文件另存为CSV以便于导入。然后使用Import-Csv导入文件,使用ForEach-Object循环,使用Get-ADUser获取用户详细信息,使用Select-Object选择所需的属性,最后将所有
导出到输出CSV文件Export-Csv。

First, save your Excel file as a CSV for easy importing. Then import the file using Import-Csv, loop through with ForEach-Object, get the user details with Get-ADUser, select the properties you want with Select-Object, and then finally export everything to an output CSV file with Export-Csv.

链接:

http://ss64.com/ps/import-csv.html

http://ss64.com/ps/foreach-object.html

http://ss64.com/ps/get-aduser.html

< a href ="http://ss64.com/ps/select-object.html"target ="_ blank"> http://ss64.com/ps/select-object.html

http://ss64.com/ps/export-csv.html

如果您遇到问题,请发布您的代码和错误,我们可以帮助您。

If you get stuck, post your code and your errors and we can help you from there.


这篇关于枚举电子邮件列表中的用户列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆