ConvertFrom-EncodedSqlName
Returns the original SQL Server identifier when given an identifier that has been encoded into a format usable in Windows PowerShell paths.
Sintaxis
Default (Es el valor predeterminado).
ConvertFrom-EncodedSqlName
[-SqlName] <String>
[<CommonParameters>]
Description
The ConvertFrom-EncodedSqlName cmdlet returns the un-encoded SQL Server identifier when given an identifier that has been encoded into a format usable in Windows PowerShell paths.
SQL Server delimited identifiers can contain special characters not normally supported in Windows PowerShell object names.
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 is in the format %nn.
Decode-SqlName converts the following encodings to the corresponding characters:
- %5C becomes \
- %3A becomes :
- %2E becomes .
- %2F becomes /
- %25 becomes %
- %3C becomes <
- %3E becomes >
- %2A becomes *
- %3F becomes ?
- %5B becomes [
- %5D becomes ]
- %7C becomes |
Ejemplos
Example 1: Decode a SQL Server identifier
PS C:\> ConvertFrom-EncodedSqlName -SqlName "My%3ATable`/"
My:Table/
This command decodes a SQL Server identifier that has an encoded hexadecimal representation for the : character. Windows PowerShell also removes the escaping back-tick character (`) from an escaped / character.
Parámetros
-SqlName
Specifies the SQL Server identifier that this cmdlet reformats.
Propiedades del parámetro
Tipo: | String |
Valor predeterminado: | None |
Admite caracteres comodín: | False |
DontShow: | False |
Conjuntos de parámetros
(All)
Posición: | 1 |
Mandatory: | True |
Valor de la canalización: | True |
Valor de la canalización por nombre de propiedad: | True |
Valor de los argumentos restantes: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.