Currently I am using a free plan with Dynamsoft for source control with PowerGui, you get 25 MB for free, which will last me a long time at my current speed of writing PowerShell scripts
Here is a quick guide to setting up an account.
Go to http://www.dynamsoft.com/products/SAWHosted_FreePlan.aspx and sign up for a free account.
Just fill in your information, and wait for the confirmation email. When the mail arrives you have to click the link to activate your account, on that page there is a link to download the Dynamsoft Source AnyWhere Hosted Server Manager:
I my case running on Windows I choose the Windows version
Download and install the client.
It prompts you if you want to make it your default Source Control provider, which in my case I choose yes, since this is my private machine.
You then fire you PowerGui Pro, and go to Tools –> Options
Under options you choose “Version Control” and in Current provider you choose Dynamsoft SourceAnyware Hosted then click advanced.
In the General Pane I choose a new path for saving Temp files.
Under External Programs I put in the path for PowerGUI Pro, in my Case: C:\Program Files (x86)\Quest Software\PowerGUI Pro\ScriptEditor.exe
(I use WinMerge for file comparison, so that is what you see in the image below WinMerge can be downloaded here: http://winmerge.org/ )
If you do not want to view the DynamSoft Login log every time you login.
First time you try to save a script in PowerGui Pro, it will prompt you if you want to check it into your Source Control system.
A login box will appear, fill in the fields with the data from your welcome mail, and choose if you want to be prompted for a password, everything you check something in/out.
You get prompted to choose a Repository, in this case just choose “default”
In my case I have a few existing Projects, but I choose to create a new Project called “Test Project”
You then get prompted to put in a comment
In PowerGui you now have an extra menu called “Version Control” and you can see a mark on each tab if your script is in the source control and if it is checked in or out.
I have checked the script out (If you try to edit the script, it will automatically prompt you to check out the script), I made some changes, and try to check it in again.
You get prompted to enter a comment, after that is entered the file is checked back in.. (You can leave to comment field blank if you do not want to write something)
You can manage your software projects from the DynamSoft application.
Go to start menu and choose Dynamsoft SourceAnywhere Hosted
Sign in with your username/Password
First thing do to is go to Tools –> Options –> External Programs
As you can see my test project is now in my list of projects.
One thing I have noticed is that Dynamsoft default checks files in as Binary files, which means it does not allow you to do a text comparison of the two, in order to change that right click the .ps1 file and choose properties.
Then you change the type from Binary to Mergeable, you can now compare your different versions of checked in files.
Right click the file you want to “compare”, then choose “Show History”, you get a lot of options to choose from, in most cases the default options are enough. Click OK
In this example I have made an initial version of the script then made some changes and checked it back in.
I highlight both files and choose Diff
This will bring up WinMerge and show the differences (This is a horrible example of file comparison I Know)
This guide should be enough to get you started…
Here is a better example of script a script comparison.