February 2017
Beginner
737 pages
15h 22m
English
Windows PowerShell can be used either interactively or as a script automation. Before we take a look at script automations, let's explore the use of an interactive shell.
We can do arithmetic operations in Windows PowerShell as follows:
2 + 2
This will return 4. Consider the following operation:
2 + 2 * 3
This will return 8.
Windows PowerShell does left-to-right arithmetic operations according to the precedence rules. In the preceding expressions, PowerShell performed the operation as 2 * 3 + 2. We need to use parenthesis, as with (2 + 2) * 3, which return the result as 12. Here, (2 + 2) is known as grouping.
Using Windows PowerShell, we can do much more, such as system unit calculations, hexadecimal conversions, and so ...
Read now
Unlock full access