Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dell BIOS Detection Method #92

Open
Ebag333 opened this issue Jun 27, 2019 · 4 comments
Open

Add Dell BIOS Detection Method #92

Ebag333 opened this issue Jun 27, 2019 · 4 comments

Comments

@Ebag333
Copy link
Member

Ebag333 commented Jun 27, 2019

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"
}

@Ebag333
Copy link
Member Author

Ebag333 commented Jun 27, 2019

# 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"
}

@Ebag333
Copy link
Member Author

Ebag333 commented Jun 27, 2019

# 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"
}

@Ebag333
Copy link
Member Author

Ebag333 commented Jun 27, 2019

# 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"
}

@Ebag333
Copy link
Member Author

Ebag333 commented Jun 27, 2019

# 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"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant