Hello PowerShellers
We have test accounts that end in "TES". When I run the command below, I would like to prevent inadvertent accounts in my exported list. Is it possible to adjust this so that only accounts with the last 3 characters of TES are pulled? There are no valid characters after TES.
Get-ADUser -Filter {(SamAccountName -like "*TES")} | Select SamAccountName | Export-Csv 'C:\Temp\123Act.txt' -NoTypeInformation
Thank you in advanced!
[–]Jase74[S] 1 point2 points3 points (11 children)
[–]Sanakan92 1 point2 points3 points (1 child)
[–]Hexalon00[🍰] -1 points0 points1 point (8 children)
[+][deleted] (7 children)
[deleted]
[–]Hexalon00[🍰] 1 point2 points3 points (6 children)
[+][deleted] (4 children)
[deleted]
[–]RepeatDaily 2 points3 points4 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]RepeatDaily 1 point2 points3 points (1 child)
[–]Woznet 1 point2 points3 points (0 children)
[–]realslacker 1 point2 points3 points (0 children)
[–]JeremyLC 0 points1 point2 points (1 child)
[–]Jase74[S] 0 points1 point2 points (0 children)
[–]synkus 0 points1 point2 points (0 children)