qpg

qpg

adventures in life, music & technology

No Escape: Escaping Characters in Windows PowerShell

Welcome to Windows Wednesday. I’ll make no claims of regularity for this feature.

I found myself needing to escape an apostrophe (a.k.a. single quote ') in a path while using the Exchange Management Shell. Escaping characters on Linux with a backslash \ is second nature to me, but the need had never arisen in Windows. Double quotes " had always been sufficient. In this particular instance they were wholly ineffective. Thankfully, Techtopia had an article describing Windows PowerShell 1.0 String Quoting and Escape Sequences, most notably the back quote `. Use it in Windows PowerShell just like you would the backslash in Linux or BSD.

Since the description of this blog mentions music, and I have yet to broach the subject, I offer this 1979 Cabaret Voltaire classic covering The Seeds track “No Escape” from their self titled 1966 LP. I find the refrain to be fitting, considering the predicament that prompted this post.