Last active
August 29, 2015 14:05
-
-
Save kkamegawa/2da502aab323db0de5dd to your computer and use it in GitHub Desktop.
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
$fontregistory = 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\' | |
$fonts = get-item -Path $fontregistory | Select-Object -expandProperty Property | |
foreach($font in $fonts){ | |
$fontpath = get-ItemProperty -path $fontregistory | select-Object -property $font | |
#if font path is full path and exist | |
$FontExist = Test-Path $fontpath.$font | |
if($FontExist -eq $true){ | |
if($fontpath.$font.EndsWith('.otf', $true, $null) -eq $true){ | |
Write-Host "Your environmet will trouble with MS14-045. See https://support.microsoft.com/kb/2982791" | |
return | |
} | |
} | |
} | |
Write-Host "Your environment is OK." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I may write with pipeline like this https://gist.github.com/guitarrapc/e7285c3c66e723e6d8cb