Forked from poychang/CheckDotnetHostingBundleVersion.ps1
Created
December 11, 2018 08:00
-
-
Save rqx110/0b2d428ddb6ff4e01f5adab9d99a1608 to your computer and use it in GitHub Desktop.
[檢查 IIS 的 .NET Core Hosting Bundle 版本] #powershell
This file contains hidden or 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