Learn PowerShell Scripting in a Month of Lunches, Second Edition, Video Edition

Learn PowerShell Scripting in a Month of Lunches, Second Edition, Video Edition

English | MP4 | AVC 1920×1080 | AAC 44KHz 2ch | 8h 17m | 1.24 GB

Automate complex tasks and processes with PowerShell scripts. This amazing book teaches you how to write, test, and organize high-quality, reusable scripts for Windows, Linux, and cloud-based systems.

Learn PowerShell Scripting in a Month of Lunches, Second Edition takes you beyond command-line PowerShell and opens up the amazing world of scripting and automation. In just 27 bite-sized lessons, you’ll learn to write scripts that can eliminate repetitive manual tasks, create custom reusable tools, and build effective pipelines and workflows.

In Learn PowerShell Scripting in a Month of Lunches, Second Edition you’ll learn:

  • Setting up a reliable scripting environment
  • Designing functions and scripts
  • Effective pipeline usage
  • Scripting and security
  • Dealing with errors and bugs
  • Source control with git
  • Sharing and publishing scripts
  • Professional-grade scripting practices

The PowerShell language lets you write scripts to control nearly every aspect of Windows. Just master a few straightforward scripting skills, and you’ll save yourself from hours of tedious tasks. This revised second edition is fully updated to PowerShell’s latest version, including hands-on examples that perfectly demonstrate modern PowerShell’s cross-platform applications.

You can write PowerShell scripts to automate nearly any admin task on Windows, Linux, and macOS. This book shows you how! In just 27 short lessons you can complete on your lunch break, you’ll learn to create, organize, test, and share scripts and tools that will save you hours of time in your daily work.

Learn PowerShell Scripting in a Month of Lunches, Second Edition is a hands-on introduction to PowerShell automation and toolbuilding. Updated for the latest version of PowerShell, this thoroughly revised bestseller teaches you how to write efficient scripts, find and squash bugs, and organize your tools into libraries. Along the way, you’ll even pick up tips for securing and managing Linux and macOS systems.

What’s inside

  • Setting up a reliable scripting environment
  • Designing functions and scripts
  • Effective pipeline usage
  • Sharing and publishing scripts
Table of Contents

1 Part 1
2 Before you begin
3 Is this book for you
4 What you need for this book
5 How to use this book
6 Expectations
7 How to ask for help
8 Summary
9 Setting up your scripting environment
10 PowerShell
11 Administrative privileges and execution policy
12 Script editors
13 Our lab environment
14 Example code
15 Your turn
16 Summary
17 WWPD What would PowerShell do
18 Naming your tools
19 Naming parameters
20 Producing output
21 Don t assume
22 Avoid innovation
23 Summary
24 Review Parameter binding and the PowerShell pipeline
25 It s all in the parameters
26 Pipeline ByValue
27 ByPropertyName
28 Summary
29 Scripting language A crash course
30 The If construct
31 The ForEach construct
32 The Switch construct
33 The DoWhile construct
34 The For construct
35 Break
36 Summary
37 The many forms of scripting (and which to choose)
38 Thinking about tools
39 Thinking about controllers
40 Comparing tools and controllers
41 Some concrete examples
42 Control more
43 Lab
44 Summary
45 Scripts and security
46 Execution policy
47 PowerShell isn t the default application
48 Running scripts
49 Recommendations
50 Summary
51 Part 2
52 Always design first
53 Tools are testable
54 Tools are flexible
55 Tools look native
56 For example
57 Your turn
58 Summary
59 Avoiding bugs Start with a command
60 Breaking it down, and running it right
61 Running commands and digging deeper
62 Process matters
63 Know what you need
64 Your turn
65 Summary
66 Building a basic function and script module
67 Creating a script module
68 Prereq check
69 Running the command
70 Your turn
71 Summary
72 Getting started with advanced functions
73 Your turn
74 Summary
75 Objects The best kind of output
76 Constructing and emitting output
77 A quick test
78 An object alternative
79 Enriching objects
80 Your turn
81 Summary
82 Using all the streams
83 Adding verbose and warning output
84 Doing more with -Verbose
85 Information output
86 Your turn
87 Summary
88 Simple help Making a comment
89 Getting started
90 Going further with comment-based help
91 Broken help
92 Beyond comments
93 Your turn
94 Summary
95 Errors and how to deal with them
96 Bad handling
97 Two reasons for exception handling
98 Handling exceptions in your tool
99 Capturing the exception
100 Handling exceptions for non-commands
101 Going further with exception handling
102 Your turn
103 Summary
104 Filling out a manifest
105 Creating a new manifest
106 Examining the manifest
107 Your turn
108 Summary
109 Part 3
110 Changing your brain when it comes to scripting
111 Example 2
112 Your turn
113 Summary
114 Professional-grade scripting
115 Code clarity
116 Effective comments
117 Formatting your code
118 Meaningful variable names
119 Avoiding aliases
120 Logic over complexity
121 Providing help
122 Avoiding Write-Host and Read-Host
123 Sticking with single quotes
124 Not polluting the global scope
125 Being flexible
126 Prioritizing security
127 Striving for elegance
128 Summary
129 An introduction to source control with Git
130 What is Git
131 Repository basics
132 Using Git with VS Code
133 Integrating with GitHub
134 Summary
135 Pestering your script
136 Problems with manual testing
137 Benefits of automated testing
138 Introducing Pester
139 Coding to be tested
140 What do you test
141 Writing a basic Pester test
142 Summary
143 Signing your script
144 A word about certificates
145 Configure your script signing policy
146 Code-signing basics
147 Summary
148 Publishing your script
149 Exploring the PowerShell Gallery
150 Other publishing options
151 Before you publish
152 Ready, set, publish
153 Publishing scripts
154 Summary
155 Part 4
156 Squashing bugs
157 Dealing with syntax bugs
158 Dealing with results bugs
159 Dealing with logic bugs
160 Your turn
161 Summary
162 Enhancing script output presentation
163 Creating a default view
164 Your turn
165 Summary
166 Wrapping up the .NET Framework
167 Exploring a class
168 Making a wrapper
169 A more practical example
170 Your turn
171 Summary
172 Storing data not in Excel!
173 Setting up everything
174 Using your database Creating a table
175 Saving data to SQL Server
176 Querying data from SQL Server
177 Summary
178 Never the end
179 Taking your next step
180 What s in your future
181 Summary

Homepage