PowerShell Snippet#5: Running MSBuild
Script on running MSBuild via PowerShell. This ties up neatly with my previous post. $msbuild = "C:\Windows\Microsoft.Net\Framework\v4.0.30319\MSBuild.exe" $MsBuilExists = Test-Path $msbuild If ($MsBuilExists -ne $true) {write-host "msbuild does not exist at this location. Install Visual Studio 2015 (Community Edition should be adequate)"} $buildFile = $PSScriptRoot+"\BuildAllDBProjects.targets.xml" & $msbuild $buildFile