Open Ebag333 opened 5 years ago
# If version is a number like 1.2.3, then prepend with [VERSION]
# If version starts with A, then leave it a string
# CHANGE ME
$TargetBIOSVersion = [VERSION]"1.6.4"
# CHANGE ME
$BIOSVersion = (Get-WmiObject -Query "select SMBIOSBIOSVersion from Win32_BIOS").SMBIOSBIOSVersion
If ($BIOSVersion -like 'A*')
{
$BIOSVersion = $BIOSVersion -replace "A", ""
}
else
{
$BIOSVersion = [Version]BIOSVersion
}
if($BIOSVersion -ge $TargetBIOSVersion)
{
Write-Host "Installed"
}
# If version is a number like 1.2.3, then prepend with [VERSION]
# If version starts with A, then leave it a string
# CHANGE ME
$TargetBIOSVersion = [VERSION]"1.6.4"
# CHANGE ME
$BIOSVersion = (Get-WmiObject -Query "select SMBIOSBIOSVersion from Win32_BIOS").SMBIOSBIOSVersion
If ($BIOSVersion -like 'A*')
{
$BIOSVersion = [INT]($BIOSVersion -replace "A", "")
}
else
{
$BIOSVersion = [Version]BIOSVersion
}
if($BIOSVersion -ge $TargetBIOSVersion)
{
Write-Host "Installed"
}
# If version is a number like 1.2.3, then prepend with [VERSION]
# If version starts with A, then leave it a string
# CHANGE ME
$TargetBIOSVersion = "A30"
# CHANGE ME
$BIOSVersion = (Get-WmiObject -Query "select SMBIOSBIOSVersion from Win32_BIOS").SMBIOSBIOSVersion
If ($BIOSVersion -like 'A*')
{
$BIOSVersion = [INT]($BIOSVersion -replace "A", "")
$TargetBIOSVersion = [INT]($TargetBIOSVersion -replace "A", "")
}
else
{
$BIOSVersion = [Version]$BIOSVersion
}
Write-Host $BIOSVersion
if($BIOSVersion -ge $TargetBIOSVersion)
{
Write-Host "Installed"
}
# If version is a number like 1.2.3, then prepend with [VERSION]
# If version starts with A, then leave it a string but do NOT put the A at the start
# CHANGE ME
$TargetBIOSVersion = "30"
# CHANGE ME
$BIOSVersion = (Get-WmiObject -Query "select SMBIOSBIOSVersion from Win32_BIOS").SMBIOSBIOSVersion
If ($BIOSVersion -like 'A*')
{
$BIOSVersion = [INT]($BIOSVersion -replace "A", "")
}
else
{
$BIOSVersion = [Version]$BIOSVersion
}
if($BIOSVersion -ge $TargetBIOSVersion)
{
Write-Host "Installed"
}
If version is a number like 1.2.3, then prepend with [VERSION]
If version starts with A, then leave it a string
CHANGE ME
$TargetBIOSVersion = [VERSION]"1.6.4"
CHANGE ME
$BIOSVersion = (Get-WmiObject -Query "select SMBIOSBIOSVersion from Win32_BIOS").SMBIOSBIOSVersion
If ($BIOSVersion -like 'A*') { $BIOSVersion = $BIOSVersion -replace "A", "" } else { $BIOSVersion = [Version]BIOSVersion }
if($BIOSVersion -ge $TargetBIOSVersion) { Write-Host "Installed" }