-
Book Overview & Buying
-
Table Of Contents
SQL Server 2012 with PowerShell V3 Cookbook
By :
We will now dive into the specifics of PowerShell syntax.
A semicolon is typically a mandatory statement terminator in many programming and scripting languages. PowerShell considers both a newline and a semicolon as statement terminators, although using the newline is more common, that's why you won't see a lot of semicolons in most PowerShell scripts. There is a caveat for using the newline; that is, the previous line must be a complete statement before it gets executed.
The backtick (`) is a peculiar character in PowerShell, and it has double meaning. You can typically find this character in your keyboard above the left Tab key, and is in the same key as the tilde (~) symbol.
The backtick is the escape character in PowerShell. Some of the common characters that need to be escaped are:
|
Escaped Character |
Description |
|---|---|
|
|
Newline |
|
|
Carriage return |
|
|
Single quote |
|
|
Double quote |
|
|
Null |
PowerShell also uses...