Created
November 23, 2018 01:29
-
-
Save poychang/239f6a11fd9e9d1606b499839d991b62 to your computer and use it in GitHub Desktop.
[檢查 IIS 的 .NET Core Hosting Bundle 版本] #powershell
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
$DotNETCoreUpdatesPath = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Updates\.NET Core" | |
$DotNetCoreItems = Get-Item -ErrorAction Stop -Path $DotNETCoreUpdatesPath | |
$NotInstalled = $True | |
$DotNetCoreItems.GetSubKeyNames() | Where { $_ -Match "Microsoft .NET Core.*Windows Server Hosting" } | ForEach-Object { | |
$NotInstalled = $False | |
Write-Host "The host has installed $_" | |
} | |
If ($NotInstalled) { | |
Write-Host "Can not find ASP.NET Core installed on the host" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment