Keeping Script Files in sync


A lot of what I do is around PowerShell Scripting. Yes I’m a SharePoint guy, but I do a LOT of PowerShell. In the past, I had issues keeping copies of my scripts in sync when I would work on one on my host machine, and then copy it to one of my SharePoint 2010 VMs and make some changes, then copy back, etc. It was painful and I knew there was a better way, I just didn’t take the time to setup a better solution.

I now have a new laptop, which I might add is awesome. Without going on too much of a tangent about the machine itself, I will say it’s an HP EliteBook 8570W, i7 with 32GB of RAM and a 750GB HDD. It does pretty well for SharePoint testing and development. On this box though, it’s even more possible to have multiple VMs running at once. Since i was building this from scratch on top of Windows 8 Professional + Hyper-V, I decided to leverage SkyDrive to make keeping my script files in sync easier and much less burdensome.

Here’s what I have done, it’s really quite simple:

  1. Signed up for a SkyDrive Account at www.skydrive.com
  2. Setup the Desktop App on my Windows 8 Host, it syncs a bunch of stuff – but the main folder we’re talking about is called “PowerShell Scripts”
  3. Stored all of my PowerShell Scripts in the SkyDrive folder instead of a local folder. Note: It still has a local “offline” folder in C:\Users\Username\SkyDrive
  4. Setup the Desktop App on my Virtual Machines to sync JUST the PowerShell Scripts folder.

Once I have this setup, I can be working on my SP2010 Enterprise VM and I have access to all of my scripts and XML, and if I make an update to one of them and save it – it’s almost instantaneously available to any other environment leveraging my SkyDrive account. I can then jump over to a SP2013 VM or my host, and have the same copy I was just working on.

I thought I should share this, as I think there are others out there who could benefit from this kind of approach – so far it’s working great for me.

RD

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s