Staying with our current theme of manipulating strings this is how you find duplicate characters in a string.
function get-duplicatechar {
[CmdletBinding()]
param (
[string]$teststring
)
$teststring.ToCharArray() |
Group-Object -NoElement | … Read the full text.