Encodes extended characters in SQL Server names to formats usable in PowerShell paths.
Encode-SqlName [-SqlName*] <string> [<CommonParameters>]
Encodes special characters in SQL Server names to formats usable in PowerShell paths. SQL Server delimited identifiers can contain characters not normally supported in PowerShell object names. When using delimited identifiers in SQL Server provider paths, these extended characters must be either encoded to their hexadecimal representation or escaped using the ` character. Certain characters, such as the colon character (:) cannot be escaped. The hexadecimal encoding for the characters is in the format %nn. The characters encoded by Encode-SqlName are: :./%*?|
- Encodes a SQL Server table name that contains : and / characters:
C:PS> Encode-SqlName -SqlName "My:Table/" My%3ATable%2F