Powershell script only converting last sAmAccountname to name -
just wrote quick script below convert samaccountname name. converts last samaccountname in list. why? doing wrong?
$users = get-content .\tempuser.txt $results = @() foreach($user in $users) { $result = get-aduser -identity $user | select name, samaccountname } $result | out-file .\test12.txt
change following line adding plus:
$result += get-aduser -identity $user | select name,samaccountname
Comments
Post a Comment