List of Figures

 

Chapter 1. Before you begin

Figure 1.1. Test environment diagram

Chapter 2. PowerShell scripting overview

Figure 2.1. Running a script requires you to provide a path to it.

Figure 2.2. Running a script and viewing its output in the PowerShell ISE

Figure 2.3. Using IntelliSense to complete command names

Figure 2.4. Using parameter name IntelliSense in the ISE

Figure 2.5. Red squiggly underlines call your attention to syntax errors.

Figure 2.6. Color coding is another way the ISE alerts you to possible syntax errors.

Figure 2.7. Highlighting matching brackets is another way the ISE helps you avoid syntax errors.

Chapter 4. Simple scripts and functions

Figure 4.1. Pasting the command into the ISE

Figure 4.2. Ensuring the command runs correctly after editing it

Figure 4.3. Saving the script as C:\Get-OSInfo.ps1

Figure 4.4. Running the new script file

Figure 4.5. PowerShell offers IntelliSense for our script’s parameter.

Figure 4.6. Running C:\Tools.ps1

Figure 4.7. Dot sourcing C:\Tools.ps1 and then running the Get-OSInfo function

Figure 4.8. Running Tools.ps1 to define and test our function

Chapter 5. Scope

Figure 5.1. This ISE window has two runspaces (global scopes); the second one, which is selected, has three script file tabs.

Figure 5.2. Scopes within scopes within scopes within scopes

Chapter 11. Debugging techniques

Figure 11.1. Highlight a portion of code and press F8 to run just that portion.

Chapter 12. Creating custom format views