I am trying to get the Source Version Changeset number from TFS. I am using a PowerShell script to add the AssemblyInformationalVersion. I have tried using $env:TF_BUILD SOURCEGETVERSION but this dosen't work it just return blank. We are using TFS 2012 with a custom build template calling the PowerShell scripts (http://www.colinsalmcorner.com/post/build-script-hooks-for-tfs-2012-builds)
I really want to keep everything within the PowerShell Script