As my knowledge of Powershell has increased, so too has the length and complexity of the scripts I create. My current record for example is a 387 line script. How did I keep track of all of the changes in a script of this length?
Not very well I’m afraid. I knew there had to be a better way. I was familiar with the concept of Source Control from the likes of Team Foundation Server but had never looked into it. As I sat down to figure out what my solution would look like, I identified the following requirements:
- The source control system, whatever it is must be integrated with PowerGUI as that is my editor of choice
- It must offer some kind of online component either that I host myself or is hosted by a third party so I can maintain a single repository from both work and home
As you can see, my requirements are rather universal and I’m sure are shared by other aspiring Powershell script writers around the world. So you can imagine my surprise then when upon starting my research into options I was surprised to find remarkably little information on this subject. There were pockets of information but they were scattered at best and others simply did not seem to exist.
That’s why I created this HOWTO. It represents many, many hours of trial and error on my part to come up with a Powershell centric source management system. Not only will this guide identify what you need and explain HOW to install it but it will also delve into WHY it is configured this way. My pain is your gain. So with that out of the way, let’s get started!