Monday 28 November 2016

Splat! Ahhhaaaa!!!

Ever had a situation where you need to execute a cmdlet in PowerShell but also needed to pass in different parameters depending on what parameters had been passed to your code? So the first thing you try is using a whole lot of if else statements...but that is butt ugly and verbose right?

Well, PowerShell uses a technique called Splatting to resolve this. Here is a simple enough post to explain it: https://ramblingcookiemonster.wordpress.com/2014/12/01/powershell-splatting-build-parameters-dynamically/

Thanks rambling cookie monster!

Monday 21 November 2016

Migrating from TFS to Git

Ok, so I want to migrate my TFS source code to a Git repository but I don't want to lose any history - how do I do it? Git-tf will do the job quite nicely and this blog post does a decent job of explaining it: https://chriskirby.net/blog/migrate-an-existing-project-from-tfs-to-github-with-changeset-history-intact

Only thing to keep in mind is that Git-tf uses Java so that will need to be installed first.

Happy days!

Thursday 3 November 2016

Deploying Master Data Services (MDS) Models using VSTS!

If you need to know how and why and what when it comes to MDS model deployment then this article is the best I have read to help you understand the basics: http://www.sqlchick.com/entries/2015/3/16/how-to-deploy-master-data-services-models-between-environments

However, what it doesn't cover is how to get a Build or Release engine like VSTS to deploy the models remotely. Fortunately VSTS provides a PowerShell on Target Machines Build Task that enables us to execute the MDSModelDeploy.exe command remotely.

I have a PowerShell script in my TFS repository that I copy to the target machine using a Copy Files Build Task and then invoke that script using the PowerShell on Target Machines task.


Now all I need to do is figure out why PS-Remoting is not working on my MDS servers...oh well, next blog post dudes :-)