• schleep - Monday, October 2, 2017 5:52 AM

    Oddly, my editor recognizes that alias for ConvertTo-EncodedSQLName, but I get cmdlet or function not found, when I try to use it outside of the here-string.
    Still getting the same errors when i put that inside the here-string.

    That is weird - not sure when that cmdlet came out as I'm kind of sick of trying to track Powershell versions all the time.
    I guess the error makes sense as that would be for Powershell and your creating a .Net type. So could be two different ways to escape it. You could try to hard code in the Powershell encoding - replace the backslash with  %5C  but I am guessing you already did.
    I  thought the escaping in .net would be the backslash you already tried so I'm out of ideas.

    Sue