Book Image

PowerShell Troubleshooting Guide

By : Mike Shepard
Book Image

PowerShell Troubleshooting Guide

By: Mike Shepard

Overview of this book

Table of Contents (15 chapters)
PowerShell Troubleshooting Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Version control


Source control, or version control, is for developers, right? Why would PowerShell scripters, who are mostly administrators of one flavor or other, need to use source control? Here are a few scenarios that will hopefully convince you.

You get a call at midnight that a mission-critical script is failing. You dial into the server and look at a thousand-line script with no indication of what the problem is. With source control you would at least be able to look at the history of the script and see if there were any changes made recently. Recent changes aren't always the culprit, but without anything else to go on, they are usually a good place to start. If you're lucky, the person who made the changes included a really good check-in comment about why the changes were made that will help you determine if it's relevant. If it sounds like it's the problem, a solution might be as simple as reverting the script to its previous version.

Let's take a look at a second scenario. The drive...