en/Microsoft.SqlServer.Management.PSProvider.dll-Help.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Convert-UrnToPath</command:name> <command:verb>Convert</command:verb> <command:noun>UrnToPath</command:noun> <maml:description> <maml:para>Converts a SQL Server Management Object URN to a Windows PowerShell provider path.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The Convert-UrnToPath cmdlet converts a SQL Server Management Object Uniform Resource Name (URN) to a SQL Server provider path.</maml:para> <maml:para>SQL Server Management Objects have a Urn property that returns a string indicating their location in the SQL Server object hierarchy.</maml:para> <maml:para>If nodes in the Urn are SQL Server delimited identifiers with extended characters that are not supported in Windows PowerShell path nodes, the extended characters are encoded with their hexadecimal representation.</maml:para> <maml:para>For example, a table name "Main:Table" is encoded as "Main%3ATable".</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Convert-UrnToPath</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="none"> <maml:name>Urn</maml:name> <maml:Description> <maml:para>Specifies a SQL Server URN that identifies the location of an object in the SQL Server hierarchy.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="none"> <maml:name>Urn</maml:name> <maml:Description> <maml:para>Specifies a SQL Server URN that identifies the location of an object in the SQL Server hierarchy.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>String</maml:name> </dev:type> <maml:description> <maml:para>Specifies a string that represents a SQL Server Management Object URN.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>String</maml:name> </dev:type> <maml:description> <maml:para>Specifies a string that represents a SQL Server PowerShell provider path.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>----- Example 1: Get a string containing the current path -----</maml:title> <dev:code>PS C:\> Set-Location "SQLSERVER:\SQL\MyComputer\MyInstance\Databases\AdventureWorks2014" PS SQLSERVER:\SQL\MyComputer\MyInstance\Databases\AdventureWorks2014> Convert-UrnToPath -Urn (Get-Item .).Urn.ToString() SQLSERVER:\SQL\MyComputer\MyInstance\Databases\AdventureWorks2014</dev:code> <dev:remarks> <maml:para>This command returns a string that contains the current path. The example uses the ToString() function of the Urn property to return the Urn as a string.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>------- Example 2: Set the path location based on a URN -------</maml:title> <dev:code>PS C:\> Set-Location (Convert-UrnToPath -Urn "Server[@Name='MyComputer']/Database[@Name='AdventureWorks']/Table[@Name='Address' and @Schema = 'Person']")</dev:code> <dev:remarks> <maml:para>This command sets the path to the location specified in a SQL Server Management Object URN.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>---------------- Example 3: Get database paths ----------------</maml:title> <dev:code>PS C:\> Set-Location "SQLSERVER:\SQL\MyComputer\DEFAULT\Databases" PS SQLSERVER:\SQL\MyComputer\DEFAULT\Databases> foreach ($Item in Get-ChildItem) { $Item.Urn.ToString() | Convert-UrnToPath } SQLSERVER:\SQL\MyComputer\DEFAULT\Databases\AdventureWorks2014</dev:code> <dev:remarks> <maml:para>This command returns an array of strings that contain the path to a database in the default instance. The pipeline operator is used to pass the current node URN to Convert-UrnToPath.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>ConvertFrom-EncodedSqlName</command:name> <command:verb>ConvertFrom</command:verb> <command:noun>EncodedSqlName</command:noun> <maml:description> <maml:para>Returns the original SQL Server identifier when given an identifier that has been encoded into a format usable in Windows PowerShell paths.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>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.</maml:para> <maml:para>SQL Server delimited identifiers can contain special characters not normally supported in Windows PowerShell object names.</maml:para> <maml:para>These extended characters must be either encoded to their hexadecimal representation or escaped using the ` character.</maml:para> <maml:para>Certain characters, such as the colon character (:) cannot be escaped.</maml:para> <maml:para>The hexadecimal encoding is in the format %nn.</maml:para> <maml:para>Decode-SqlName converts the following encodings to the corresponding characters: - %5C becomes \</maml:para> <maml:para>- %3A becomes :</maml:para> <maml:para>- %2E becomes .</maml:para> <maml:para>- %2F becomes /</maml:para> <maml:para>- %25 becomes %</maml:para> <maml:para>- %3C becomes <</maml:para> <maml:para>- %3E becomes ></maml:para> <maml:para>- %2A becomes *</maml:para> <maml:para>- %3F becomes ?</maml:para> <maml:para>- %5B becomes [</maml:para> <maml:para>- %5D becomes ]</maml:para> <maml:para>- %7C becomes |</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>ConvertFrom-EncodedSqlName</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="none"> <maml:name>SqlName</maml:name> <maml:Description> <maml:para>Specifies the SQL Server identifier that this cmdlet reformats.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="none"> <maml:name>SqlName</maml:name> <maml:Description> <maml:para>Specifies the SQL Server identifier that this cmdlet reformats.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>---------- Example 1: Decode a SQL Server identifier ----------</maml:title> <dev:code>PS C:\> ConvertFrom-EncodedSqlName -SqlName "My%3ATable`/" My:Table/</dev:code> <dev:remarks> <maml:para>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.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Using SQL Server Identifiers in PowerShell</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>ConvertTo-EncodedSqlName</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>ConvertTo-EncodedSqlName</command:name> <command:verb>ConvertTo</command:verb> <command:noun>EncodedSqlName</command:noun> <maml:description> <maml:para>Encodes extended characters in SQL Server names to formats usable in Windows PowerShell paths.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The ConvertTo-EncodedSqlName cmdlet encodes special characters in SQL Server names to formats usable in Windows PowerShell paths.</maml:para> <maml:para>SQL Server delimited identifiers can contain characters not normally supported in Windows PowerShell object names.</maml:para> <maml:para>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.</maml:para> <maml:para>Certain characters, such as the colon character (:) cannot be escaped.</maml:para> <maml:para>The hexadecimal encoding for the characters is in the format %nn.</maml:para> <maml:para>The characters encoded by ConvertTo-EncodedSqlName are: \ : . / % < > * ? [ ] |</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>ConvertTo-EncodedSqlName</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="none"> <maml:name>SqlName</maml:name> <maml:Description> <maml:para>Specifies the SQL Server identifier to be encoded.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="none"> <maml:name>SqlName</maml:name> <maml:Description> <maml:para>Specifies the SQL Server identifier to be encoded.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>---------- Example 1: Encode a SQL Server table name ----------</maml:title> <dev:code>PS C:\> ConvertTo-EncodedSqlName -SqlName "My:Table/" My%3ATable%2F</dev:code> <dev:remarks> <maml:para>This command encodes a SQL Server table name that contains : and / characters.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Using SQL Server Identifiers in PowerShell</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>ConvertFrom-EncodedSqlName</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |