How to lookup a list of users by full name only with powershell
Import-CSV C:\fullnames.csv | ForEach-Object { $filter = "Name -eq '" + $_.name + "'"; $b = Get-ADUser -Filter $filter; if($b) { $b.samaccountname; } else { "-Not found-" + $_.name ;} }
More about neonprimetime
Top Blogs of all-time
Top Github Contributions
Copyright © 2015, this post cannot be reproduced or retransmitted in any form without reference to the original post.
No comments:
Post a Comment