So I ran into a problem recently where I needed to convert an RTF document back to it’s base text values. I could do it via a copy & paste, but after digging around a little bit, I happened on an article from Microsoft with some pointers. How to: Convert RTF to Plain Text (C# Programming Guide)
Now, I have no problems with C# or anything that requires compilation, but I like PowerShell. So I took what Microsoft gave me and wrote a small function to do the work for me. Right now it only handles a path to the RTF file for conversion, but can probably be easily extended to allow for other permutations.
Enough talk! Code, monkey, code!!!
function Convert-FromRtf ($Path)
$Rtb = New-Object -TypeName System.Windows.Forms.RichTextBox
$Rtb.Rtf = [System.IO.File]::ReadAllText($Path)
Remove-Variable Rtb -ErrorAction SilentlyContinue