1
我想从一个CSV文件导入到PowerShell的导入职称然后使用Get-ADUser
与这些头衔返回所有活跃用户,然后导出到一个新的CSV返回职称相匹配的CSV是
可有人请帮忙?
$csvjobtitle = Import-Csv -Header csvTitle -Path c:\Job_titles.csv
Get-ADUser -Filter {enabled -eq "true" -and Title -eq "$csvjobtitle"} -
Properties SamAccountName, GivenName, Surname, EmailAddress, Title | select
SamAccountName, GivenName, Surname, EmailAddress, Title | Export-CSV "C:\Ad
Extract.csv"
你目前的代码有什么问题? – gms0ulman
您的'Job_titles.csv'中有多个项目,对吧? – restless1987