>>202
https://www.microsoft.com/en-us/download/details.aspx?id=36389
これを見つけたので 22ページあたりを読むと、シングルクォートで囲む verbatim-string-literal は、割とシンプルで
single-quote-character(普通のシングルクォート+4個) を含む場合に single-quote-character single-quote-character とするので

function ConvertTo-SingleQuotedStringLiteral ([string] $s) {
 "'{0}'" -f ($s -replace "['\u2018\u2019\u201A\u201B]", "'$&")
}
こうすればいいのだろうか?