Strangely, PowerShell does not include a string reverse function. After some googling, I wrote a simple reverse function based on regular expressions:
1 2 3 4 | function Reverse-String ($inputstring) { -join[regex]::Matches($inputstring,".",'RightToLeft') } |