26 lines
1017 B
PowerShell
26 lines
1017 B
PowerShell
|
function Get-EC2WindowsDriverVersions {
|
||
|
<#
|
||
|
.SYNOPSIS
|
||
|
Get and display the versions of the AWS EC2 Windows Drivers that might need to be updated
|
||
|
#>
|
||
|
[CmdletBinding()]
|
||
|
[OutputType([System.Void])]
|
||
|
#TODO: ADD RetVal of Hashtable of DriverName:DriverVersion or something
|
||
|
|
||
|
# Where all the windows driver downloads come from
|
||
|
# https://s3.amazonaws.com/ec2-windows-drivers-downloads
|
||
|
$getPVDriverScriptBlock = {
|
||
|
Get-ItemProperty HKLM:\SOFTWARE\Amazon\PVDriver
|
||
|
}
|
||
|
$enaVersionInfoScriptBlock = {
|
||
|
(Get-ChildItem "C:\Windows\System32\drivers\ena.sys").VersionInfo
|
||
|
}
|
||
|
$nvmeVersionInfoScriptBlock = {
|
||
|
(Get-ChildItem "C:\Windows\System32\drivers\AWSNvme.sys").VersionInfo
|
||
|
}
|
||
|
|
||
|
$servers = Get-TeamCityHostnames
|
||
|
Invoke-Command -ComputerName $servers -ScriptBlock $getPVDriverScriptBlock
|
||
|
Invoke-Command -ComputerName $servers -ScriptBlock $enaVersionInfoScriptBlock
|
||
|
Invoke-Command -ComputerName $servers -ScriptBlock $nvmeVersionInfoScriptBlock
|
||
|
}
|