We should add a function (and perhaps a param on Invoke-MSBuild) to import VS variables. You can see how to do that at https://github.com/cliffburger/posh-msbuild/blob/master/posh-msbuild.psm1#L62. The only issue with that is that it requires VS to be installed, a portable version of that would be better.