mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-15 22:36:46 +00:00
33 lines
944 B
PowerShell
33 lines
944 B
PowerShell
################################################################################
|
|
## File: Validate-WDK.ps1
|
|
## Desc: Validate the installation of the Windows Driver Kit
|
|
################################################################################
|
|
|
|
Import-Module -Name ImageHelpers -Force
|
|
|
|
function Get-WDKVersion
|
|
{
|
|
$WDKVersion = (Get-WmiObject Win32_Product -Filter "Name = 'Windows Driver Kit'").version
|
|
|
|
if (!$WDKVersion)
|
|
{
|
|
Write-Host "WDK was not found"
|
|
exit 1
|
|
}
|
|
|
|
return $WDKVersion
|
|
}
|
|
|
|
$WDKVersion = Get-WDKVersion
|
|
$WDKPackageVersion = Get-VSExtensionVersion -packageName "Microsoft.Windows.DriverKit"
|
|
|
|
# Adding description of the software to Markdown
|
|
$SoftwareName = "Windows Driver Kit"
|
|
|
|
$Description = @"
|
|
_WDK Version:_ $WDKVersion<br/>
|
|
_WDK Visual Studio Extension Version:_ $WDKPackageVersion<br/>
|
|
"@
|
|
|
|
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|