Last active
November 28, 2015 13:10
-
-
Save kkamegawa/6aa4d4261c0122f69df3 to your computer and use it in GitHub Desktop.
Check environment for UWP's Hands-on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$COmpornents = @( | |
@('Microsoft Visual Studio Community 2015','https://go.microsoft.com/fwlink/p/?LinkId=534599'), | |
@('IDE Tools for Windows 10','https://go.microsoft.com/fwlink/p/?LinkId=619296'), | |
@('Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.8','http://go.microsoft.com/fwlink/?linkid=699285&clcid=0x411'), | |
@('Microsoft SQL Server 2014 Express LocalDB','https://www.microsoft.com/ja-jp/download/details.aspx?id=42299')) | |
if ($PSVersionTable.PSVersion -lt '5.0.10586.0') { | |
Write-host "Please Install Windows 10 TH2(1511)." | |
return | |
} | |
$products = Get-WmiObject -Class Win32_Product | sort Name | select Name,Version | |
foreach($compornent in $COmpornents) { | |
$exists = $products | where{$_.Name -eq $compornent[0]} | |
if($exists -eq $false){ | |
write-host $compornent[0] 'がインストールされていません' $compornent[1] 'からインストールしてください' | |
Start-Process $compornent[1] | |
return | |
} | |
} | |
write-host 'ハンズオン環境は満たされているはずです' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment