About the Authors |
|
xiii | |
About the Technical Reviewer |
|
xv | |
Acknowledgments |
|
xvii | |
Introduction |
|
xix | |
Chapter 1 Getting Started |
|
1 | (16) |
|
Getting to Know PowerShell |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
4 | (2) |
|
|
4 | (1) |
|
CMD Is Dead-Long Live PowerShell |
|
|
5 | (1) |
|
|
5 | (1) |
|
The Natural Progression of Tool Building |
|
|
6 | (2) |
|
PowerShell Is Not Going Away |
|
|
7 | (1) |
|
What Does this Do for PowerShell? |
|
|
8 | (1) |
|
|
8 | (1) |
|
Assumptions Used in this Book |
|
|
9 | (2) |
|
How to Let PowerShell Help You Learn More |
|
|
11 | (4) |
|
|
15 | (2) |
|
|
16 | (1) |
Chapter 2 Managing the Windows Event Log |
|
17 | (18) |
|
What Can Windows Capture? |
|
|
17 | (1) |
|
Accessing the Event Log Information |
|
|
18 | (5) |
|
|
19 | (3) |
|
|
22 | (1) |
|
Why Choose One cmdlet over Another? |
|
|
22 | (1) |
|
Getting Logs from Remote Computers |
|
|
23 | (1) |
|
Shaping the Gathered Information |
|
|
24 | (3) |
|
|
24 | (3) |
|
|
27 | (1) |
|
What Else Can Be Done with this Information? |
|
|
27 | (5) |
|
Formatting HTML for Readability |
|
|
27 | (1) |
|
HTML Formatting with a Function |
|
|
28 | (4) |
|
Can PowerShell Use the Event Log to Store Information? |
|
|
32 | (1) |
|
|
33 | (2) |
Chapter 3 Gathering and Reporting Detailed Information from a Computer |
|
35 | (18) |
|
|
35 | (3) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
38 | (3) |
|
|
41 | (4) |
|
|
42 | (1) |
|
|
43 | (2) |
|
|
45 | (3) |
|
Computer System Information |
|
|
48 | (1) |
|
|
49 | (2) |
|
|
51 | (1) |
|
The Difference Between WMI and CIM |
|
|
51 | (1) |
|
|
51 | (1) |
|
|
52 | (1) |
|
|
52 | (1) |
Chapter 4 Installed Applications |
|
53 | (12) |
|
Obtaining a List of Installed Applications |
|
|
53 | (1) |
|
|
54 | (4) |
|
|
58 | (4) |
|
|
60 | (2) |
|
|
62 | (1) |
|
|
63 | (2) |
Chapter 5 Windows Update |
|
65 | (10) |
|
|
66 | (1) |
|
|
66 | (1) |
|
|
66 | (1) |
|
|
67 | (4) |
|
Details of Get-HotFix Results |
|
|
67 | (1) |
|
Checking When a Computer Was Rebooted |
|
|
68 | (3) |
|
|
71 | (1) |
|
Improvements to this Function |
|
|
71 | (1) |
|
|
72 | (2) |
|
|
74 | (1) |
Chapter 6 Manage Running Processes on a Target System |
|
75 | (14) |
|
|
75 | (3) |
|
Filtering by Process ID or Name |
|
|
78 | (10) |
|
Sorting and Selecting Information Needed |
|
|
79 | (2) |
|
Working with Returned Data |
|
|
81 | (1) |
|
Delivering the Goods: A Quick Sidestep to Sending Email |
|
|
82 | (1) |
|
Collecting Information from a Remote Computer or Computers |
|
|
82 | (1) |
|
Other Ways to Improve the Script |
|
|
83 | (1) |
|
Starting and Stopping Processes |
|
|
84 | (1) |
|
When Start-Process and Stop-Process Are Useful |
|
|
85 | (1) |
|
Select First, Then Again, and Then Stop |
|
|
86 | (1) |
|
Using WMI or CIM to Work with Processes |
|
|
86 | (1) |
|
|
87 | (1) |
|
|
88 | (1) |
Chapter 7 Review and Manage Services with PowerShell |
|
89 | (14) |
|
Access to Services with PowerShell |
|
|
89 | (1) |
|
Gathering Service Information |
|
|
90 | (11) |
|
|
90 | (5) |
|
|
95 | (6) |
|
|
101 | (2) |
Chapter 8 Continuing to Learn As PowerShell Evolves |
|
103 | (14) |
|
|
103 | (2) |
|
Desired State Configuration |
|
|
105 | (1) |
|
What Is Desired State Configuration (DSC)? |
|
|
106 | (1) |
|
|
106 | (1) |
|
Applying Configurations: Make It So |
|
|
106 | (1) |
|
What Does a DSC Configuration Look Like? |
|
|
107 | (1) |
|
What Are Some Practical Applications of DSC? |
|
|
107 | (1) |
|
Starting or Stopping Services |
|
|
107 | (1) |
|
Installing Necessary Roles or Features |
|
|
108 | (1) |
|
Fixing Configuration Drift: Wrongly Installed Applications |
|
|
108 | (1) |
|
Ensuring That Files or Folders Exist |
|
|
108 | (1) |
|
Working with DSC to Ensure IIS Is Installed |
|
|
108 | (1) |
|
|
109 | (1) |
|
How Do I Enable Remoting? |
|
|
110 | (1) |
|
A Remote PowerShell Session |
|
|
110 | (1) |
|
Using Scheduled Jobs in PowerShell |
|
|
111 | (1) |
|
|
111 | (1) |
|
|
112 | (1) |
|
Creating the Scheduled Job |
|
|
113 | (1) |
|
|
113 | (1) |
|
Getting Scheduled Job Results |
|
|
114 | (1) |
|
More Learning and Additional Resources |
|
|
115 | (1) |
|
|
115 | (2) |
Index |
|
117 | |