I have been writing PowerShell scripts for a number of years. Recently, I started using Visual Studio Community to write compiled code. While investigating different methods to version control the code, it clicked. Why not use VS to version control PowerShell scripts? Come to find out, it works great. Before, I had PowerShell scripts all over the place. Now, I have a single solution named PowerShell Scripts that has a collection of projects for different script categories (IE: Active Directory, Workstation, Database, etc.). It is really nice to be able to go to one repository to get the latest version of my scripts. It is also nice to be able to see the history of what was changed and why by easily viewing the history. All you have to do is install the PowerShell Tools for Visual Studio 2017 which is very straight forward to do.
Below is an example of a "Show Differences" to highlight a comment that I had added:
If you like this site, help us out.
Spread the word and share it with others!