GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Windows/SysWOW64/WindowsPowerShell/v1.0/en-US/ |
Upload File : |
ABOUT SPECIAL CHARACTERS Short description Describes the special character sequences that control how PowerShell interprets the next characters in the sequence. Long description PowerShell supports a set of special character sequences that are used to represent characters that aren't part of the standard character set. The sequences are commonly known as _escape sequences_. Escape sequences begin with the backtick character, known as the grave accent (ASCII 96), and are case-sensitive. The backtick character can also be referred to as the _escape character_. Escape sequences are only interpreted when contained in double-quoted (") strings. PowerShell recognizes these escape sequences: Sequence Description ---------- ----------------- `0 Null `a Alert `b Backspace `f Form feed `n New line `r Carriage return `t Horizontal tab `v Vertical tab PowerShell also has a special token to mark where you want parsing to stop. All characters that follow this token are used as literal values that aren't interpreted. Special parsing token: Sequence Description ---------- ------------------------------------ --% Stop parsing anything that follows Null (`0) The null (`0) character appears as an empty space in PowerShell output. This functionality allows you to use PowerShell to read and process text files that use null characters, such as string termination or record termination indicators. The null special character isn't equivalent to the $null variable, which stores a NULL value. Alert (`a) The alert (`a) character sends a beep signal to the computer's speaker. You can use this character to warn a user about an impending action. The following example sends two beep signals to the local computer's speaker. for ($i = 0; $i -le 1; $i++){"`a"} Backspace (`b) The backspace (`b) character moves the cursor back one character, but it doesn't delete any characters. The example writes the word BACKUP and then moves the cursor back twice. Then, at the new position, writes a space followed by the word OUT. "backup`b`b out" back out Form feed (`f) The form feed (`f) character is a print instruction that ejects the current page and continues printing on the next page. The form feed character only affects printed documents. It doesn't affect screen output. New line (`n) The new line (`n) character inserts a line break immediately after the character. This example shows how to use the new line character to create line breaks in a Write-Host command. "There are two line breaks to create a blank line`n`nbetween the words." There are two line breaks to create a blank line between the words. Carriage return (`r) The carriage return (`r) character moves the output cursor to the beginning of the current line and continues writing. Any characters on the current line are overwritten. In this example, the text before the carriage return is overwritten. Write-Host "These characters are overwritten.`rI want this text instead " Notice that the text before the `r character is not deleted, it is overwritten. I want this text instead written. Horizontal tab (`t) The horizontal tab (`t) character advances to the next tab stop and continues writing at that point. By default, the PowerShell console has a tab stop at every eighth space. This example inserts two tabs between each column. "Column1`t`tColumn2`t`tColumn3" Column1 Column2 Column3 Vertical tab (`v) The horizontal tab (`v) character advances to the next vertical tab stop and writes the remaining output at that point. This has no effect in the default Windows console. Write-Host "There is a vertical tab`vbetween the words." The following example shows the output you would get on a printer or in a different console host. There is a vertical tab between the words. Stop-parsing token (--%) The stop-parsing (--%) token prevents PowerShell from interpreting strings as PowerShell commands and expressions. This allows those strings to be passed to other programs for interpretation. Place the stop-parsing token after the program name and before program arguments that might cause errors. In this example, the Icacls command uses the stop-parsing token. icacls X:\VMS --% /grant Dom\HVAdmin:(CI)(OI)F PowerShell sends the following string to Icacls. X:\VMS /grant Dom\HVAdmin:(CI)(OI)F Here is another example. The SHOWARGS function outputs the values passed to it. In this example, we pass the variable named $HOME to the function twice. function showArgs { "`$args = " + ($args -join '|') } showArgs $HOME --% $HOME You can see in the output that, for the first parameter, the variable $HOME is interpreted by PowerShell so that the value of the variable is passed to the function. The second use of $HOME comes after the stop-parsing token, so the string "$HOME" is passed to the function without interpretation. $args = C:\Users\username|--%|$HOME For more information about the stop-parsing token, see about_Parsing. See also about_Quoting_Rules