001. Part 1
002. Chapter 1. Before you begin
003. Chapter 1. Is this book for you
004. Chapter 1. What you need for this book
005. Chapter 1. How to use this book
006. Chapter 1. Expectations
007. Chapter 1. How to ask for help
008. Chapter 1. Summary
009. Chapter 2. Setting up your scripting environment
010. Chapter 2. PowerShell
011. Chapter 2. Administrative privileges and execution policy
012. Chapter 2. Script editors
013. Chapter 2. Our lab environment
014. Chapter 2. Example code
015. Chapter 2. Your turn
016. Chapter 2. Summary
017. Chapter 3. WWPD What would PowerShell do
018. Chapter 3. Naming your tools
019. Chapter 3. Naming parameters
020. Chapter 3. Producing output
021. Chapter 3. Don t assume
022. Chapter 3. Avoid innovation
023. Chapter 3. Summary
024. Chapter 4. Review Parameter binding and the PowerShell pipeline
025. Chapter 4. It s all in the parameters
026. Chapter 4. Pipeline ByValue
027. Chapter 4. ByPropertyName
028. Chapter 4. Summary
029. Chapter 5. Scripting language A crash course
030. Chapter 5. The If construct
031. Chapter 5. The ForEach construct
032. Chapter 5. The Switch construct
033. Chapter 5. The DoWhile construct
034. Chapter 5. The For construct
035. Chapter 5. Break
036. Chapter 5. Summary
037. Chapter 6. The many forms of scripting (and which to choose)
038. Chapter 6. Thinking about tools
039. Chapter 6. Thinking about controllers
040. Chapter 6. Comparing tools and controllers
041. Chapter 6. Some concrete examples
042. Chapter 6. Control more
043. Chapter 6. Lab
044. Chapter 6. Summary
045. Chapter 7. Scripts and security
046. Chapter 7. Execution policy
047. Chapter 7. PowerShell isn t the default application
048. Chapter 7. Running scripts
049. Chapter 7. Recommendations
050. Chapter 7. Summary
051. Part 2
052. Chapter 8. Always design first
053. Chapter 8. Tools are testable
054. Chapter 8. Tools are flexible
055. Chapter 8. Tools look native
056. Chapter 8. For example
057. Chapter 8. Your turn
058. Chapter 8. Summary
059. Chapter 9. Avoiding bugs Start with a command
060. Chapter 9. Breaking it down, and running it right
061. Chapter 9. Running commands and digging deeper
062. Chapter 9. Process matters
063. Chapter 9. Know what you need
064. Chapter 9. Your turn
065. Chapter 9. Summary
066. Chapter 10. Building a basic function and script module
067. Chapter 10. Creating a script module
068. Chapter 10. Prereq check
069. Chapter 10. Running the command
070. Chapter 10. Your turn
071. Chapter 10. Summary
072. Chapter 11. Getting started with advanced functions
073. Chapter 11. Your turn
074. Chapter 11. Summary
075. Chapter 12. Objects The best kind of output
076. Chapter 12. Constructing and emitting output
077. Chapter 12. A quick test
078. Chapter 12. An object alternative
079. Chapter 12. Enriching objects
080. Chapter 12. Your turn
081. Chapter 12. Summary
082. Chapter 13. Using all the streams
083. Chapter 13. Adding verbose and warning output
084. Chapter 13. Doing more with -Verbose
085. Chapter 13. Information output
086. Chapter 13. Your turn
087. Chapter 13. Summary
088. Chapter 14. Simple help Making a comment
089. Chapter 14. Getting started
090. Chapter 14. Going further with comment-based help
091. Chapter 14. Broken help
092. Chapter 14. Beyond comments
093. Chapter 14. Your turn
094. Chapter 14. Summary
095. Chapter 15. Errors and how to deal with them
096. Chapter 15. Bad handling
097. Chapter 15. Two reasons for exception handling
098. Chapter 15. Handling exceptions in your tool
099. Chapter 15. Capturing the exception
100. Chapter 15. Handling exceptions for non-commands
101. Chapter 15. Going further with exception handling
102. Chapter 15. Your turn
103. Chapter 15. Summary
104. Chapter 16. Filling out a manifest
105. Chapter 16. Creating a new manifest
106. Chapter 16. Examining the manifest
107. Chapter 16. Your turn
108. Chapter 16. Summary
109. Part 3
110. Chapter 17. Changing your brain when it comes to scripting
111. Chapter 17. Example 2
112. Chapter 17. Your turn
113. Chapter 17. Summary
114. Chapter 18. Professional-grade scripting
115. Chapter 18. Code clarity
116. Chapter 18. Effective comments
117. Chapter 18. Formatting your code
118. Chapter 18. Meaningful variable names
119. Chapter 18. Avoiding aliases
120. Chapter 18. Logic over complexity
121. Chapter 18. Providing help
122. Chapter 18. Avoiding Write-Host and Read-Host
123. Chapter 18. Sticking with single quotes
124. Chapter 18. Not polluting the global scope
125. Chapter 18. Being flexible
126. Chapter 18. Prioritizing security
127. Chapter 18. Striving for elegance
128. Chapter 18. Summary
129. Chapter 19. An introduction to source control with Git
130. Chapter 19. What is Git
131. Chapter 19. Repository basics
132. Chapter 19. Using Git with VS Code
133. Chapter 19. Integrating with GitHub
134. Chapter 19. Summary
135. Chapter 20. Pestering your script
136. Chapter 20. Problems with manual testing
137. Chapter 20. Benefits of automated testing
138. Chapter 20. Introducing Pester
139. Chapter 20. Coding to be tested
140. Chapter 20. What do you test
141. Chapter 20. Writing a basic Pester test
142. Chapter 20. Summary
143. Chapter 21. Signing your script
144. Chapter 21. A word about certificates
145. Chapter 21. Configure your script signing policy
146. Chapter 21. Code-signing basics
147. Chapter 21. Summary
148. Chapter 22. Publishing your script
149. Chapter 22. Exploring the PowerShell Gallery
150. Chapter 22. Other publishing options
151. Chapter 22. Before you publish
152. Chapter 22. Ready, set, publish
153. Chapter 22. Publishing scripts
154. Chapter 22. Summary
155. Part 4
156. Chapter 23. Squashing bugs
157. Chapter 23. Dealing with syntax bugs
158. Chapter 23. Dealing with results bugs
159. Chapter 23. Dealing with logic bugs
160. Chapter 23. Your turn
161. Chapter 23. Summary
162. Chapter 24. Enhancing script output presentation
163. Chapter 24. Creating a default view
164. Chapter 24. Your turn
165. Chapter 24. Summary
166. Chapter 25. Wrapping up the .NET Framework
167. Chapter 25. Exploring a class
168. Chapter 25. Making a wrapper
169. Chapter 25. A more practical example
170. Chapter 25. Your turn
171. Chapter 25. Summary
172. Chapter 26. Storing data not in Excel!
173. Chapter 26. Setting up everything
174. Chapter 26. Using your database Creating a table
175. Chapter 26. Saving data to SQL Server
176. Chapter 26. Querying data from SQL Server
177. Chapter 26. Summary
178. Chapter 27. Never the end
179. Chapter 27. Taking your next step
180. Chapter 27. What s in your future
181. Chapter 27. Summary