This post is all about small but very useful piece of powershell code.
We’re using VSTS at work, and our continuous delivery workflow contains step to put all builds to network share (NAS in local network). Each build has auto incrementing version of library ( msdn). But VSTS doesn’t have any step under building or releasing cycle to put this version into VSTS at any form. Actually, you can write down script, which connects to VSTS by API and then put build version into WI field. But what is easy, when you need to compare commit and build version, just go through all builds at share and print build version and VSTS build number. Script to do that here:

What I usually do: go to network share from powershell, and then just run this script with recurse param. Output is similar to these lines:

c:\> cd "\\buildsrv\app builds"
\\buildsrv\app builds\master> Get-AssemblyInfo -Recurse
\\buildsrv\app builds\master\20160523.2\app.exe 2.34.5987.21819
\\buildsrv\app builds\master\20160523.3\app.exe 2.34.5987.22716
\\buildsrv\app builds\master\20160530.1\app.exe 2.34.5994.25569
\\buildsrv\app builds\master\20160601.1\app.exe 2.34.5996.17682
\\buildsrv\app builds\master\20160605.1\app.exe 2.35.6000.33670
\\buildsrv\app builds\master\20160607.1\app.exe 2.35.6002.22362
\\buildsrv\app builds\master\20160609.2\app.exe 2.35.6004.32871
\\buildsrv\app builds\master\20160705.1\app.exe 2.37.6030.33831
\\buildsrv\app builds\master\20160808.11\app.exe 2.39.6064.31912
\\buildsrv\app builds\master\20160828.1\app.exe 2.39.6084.16549
\\buildsrv\app builds\master\20160915.1\app.exe 2.39.6102.27957