$string = "LastName, FirstName ([samaccountname])"
[Regex]::Matches($string, '(?<=\()(.*?)(?=\))').Value
Related Posts
Quick and Easy Password Generator
This is a quick and easy password/random character generator. It...
Properly Capitalize a Title Using PowerShell
Being married to someone who majored in English has made...