Scripting syntax
We will now dive into the specifics of the PowerShell syntax.
Statement terminators
A semicolon is typically a mandatory statement terminator in many programming and scripting languages. PowerShell considers both a newline and semicolon as statement terminators, although using the newline is more common. The caveat for using the newline is that the previous line must be a complete statement before it gets executed.
Escape and line continuation
The backtick (`
) is a peculiar character in PowerShell, and it has a double meaning. You can typically find this character on your keyboard above the left Tab key, and it is on the same key as the tilde ~
symbol.
The backtick is the escape character in PowerShell. Some of the common characters ...
Get SQL Server 2014 with PowerShell v5 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.