1 if($args[0] -ceq "x86") {
2 	$arch="x86"
3 } elseif($args[0] -ceq "x86-64") {
4 	$arch="x64"
5 } else {
6 	Write-Host "Unrecognized architecture - use of these: x86, x86-64."
7 	Exit 1
8 }
9 ${VS_INST_PATH} = & "${env:ProgramFiles(x86)}/Microsoft Visual Studio/Installer/vswhere.exe" -latest -property installationPath
10 Write-Output "  <-> VS Install Path: ${VS_INST_PATH}"
11 Import-Module ${VS_INST_PATH}/Common7/Tools/Microsoft.VisualStudio.DevShell.dll
12 Enter-VsDevShell -VsInstallPath ${VS_INST_PATH} -SkipAutomaticLocation -DevCmdArguments "-arch=${arch} -no_logo"
13