https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.language.codegeneration.escapesinglequotedstringcontent?view=powershellsdk-7.4.0
CodeGeneration.EscapeSingleQuotedStringContent(String) Method...
Escapes content so that it is safe for inclusion in a single-quoted string. For example: "'" + EscapeSingleQuotedStringContent(userContent) + "'"
stringmethod