Adoray

s4b

Feb 16th, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. $users=Get-Content "D:\ownCloud\Scripts-Hacks\PowerShell\S4B-EnabledUsers\s4b-enabled.txt"
  2. foreach($user in $users)
  3. {
  4.  
  5. Get-AdUser -Properties mail -SearchBase "OU=North America,OU=SRK Global Organizational Unit,DC=SRK,DC=AD" -Filter "mail -eq '$user'" | export-csv C:\test\s4b-enabled.csv -NoTypeInformation
  6. }
Advertisement
Add Comment
Please, Sign In to add comment