How to lookup a list of users by last name only with powershell
Import-CSV C:\lastnames.csv | ForEach-Object { $filter = "Name -like '*" + $_.name + "'"; $b = Get-ADUser -Filter $filter; if($b) { $b.samaccountname + "`t" + $_.name ; } else { "-No-" + "`t" + $_.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