PowerGUI Pro Script Editor 2.0 integrates with multiple source control systems. In this blog post I will guide you through setting it up to work with Microsoft Visual Studio Team Foundation Server.
First of all, the machine on which you are doing your script development needs to have the following prerequisites from Microsoft:
- Microsoft Visual Studio Team Explorer – the setup ships with Team Foundation Server.
- Install Team Foundation Server MSSCCI Provider – it is a free download from microsoft.com but you need to make sure you pick the same version as your VS installation: 2005, 2008, or 2010 (currently RC).
Now you are ready to start using TFS inside PowerGUI!
- Start PowerGUI Pro Script Editor
- In Tools / Options / Version Control / Current provider, select Team Foundation Server MSSCCI Provider.
Once you’ve done that checking in your scripts is trivial. When you save a script, you will be prompted whether you want to add it to the source control project:
And if you click Yes you will be able to pick the TFS server and project:
And then supply your check-in comments:
After that the Tab displaying the script will have a blue check indicating that the file is under source control, and you will be able to use Version Control menu or toolbar to check in/check out the file and perform other source-control-related operations:
One final comment to add, is that if this is a fresh machine and there already exists a TFS project which you want to join and from which you want to download all existing files, you may do so using the Visual Studio or Visual Studio Team Explorer. All you need to do is add the server/project in File / Source Control / Open from Source Control menu, then double-clicking Source Control in Team Explorer, and Getting Latest Version of the projects you need:
I hope this makes your scripting even safer and more compliant with your corporate policies.