Jump to content


MarshMan0331

Device Collection for BIOS Settings

Recommended Posts

You could do that with the help of some "Compliance Baselines".

 

Here is how i would do it for Lenovo Machines.

 

 

First create a new script based Compliance Setting

post-10753-0-64967900-1365076786_thumb.jpg

 

post-10753-0-35738800-1365076794_thumb.jpg

 

Then create a new compliance baseline with this Settings and deploy it to some collection. Right click the new deployment and create a new "compliant collection". This collection will hold all Lenovo machines with AHCI enabled.

 

$ahci = gwmi -Namespace root\wmi -Class Lenovo_BiosSetting -ErrorAction SilentlyContinue
if( $ahci -is [Object]){
foreach($setting in $ahci){
if($setting.CurrentSetting -clike "*SATA*AHCI*"){
return($true)
}
}
}
return($false)

Share this post


Link to post
Share on other sites

OK, here is a simplified script, working for Lenovo and HP machines.

 

$lenovo = gwmi -Namespace root\wmi -Class Lenovo_BiosSetting -ErrorAction SilentlyContinue | Where-Object {$_.CurrentSetting -clike "*SATA*AHCI*"}

$hp = gwmi -Namespace root\hp\instrumentedBIOS -Class HP_BIOSSetting -ErrorAction SilentlyContinue | Where-Object {$_.CurrentValue -eq "AHCI"}

if( ( $lenovo -is [Object] ) -or ( $hp -is [Object] ) ){

return($true)

}

return($false)

Share this post


Link to post
Share on other sites

OK, here is a simplified script, working for Lenovo and HP machines.

 

$lenovo = gwmi -Namespace root\wmi -Class Lenovo_BiosSetting -ErrorAction SilentlyContinue | Where-Object {$_.CurrentSetting -clike "*SATA*AHCI*"}

$hp = gwmi -Namespace root\hp\instrumentedBIOS -Class HP_BIOSSetting -ErrorAction SilentlyContinue | Where-Object {$_.CurrentValue -eq "AHCI"}

if( ( $lenovo -is [Object] ) -or ( $hp -is [Object] ) ){

return($true)

}

return($false)

 

We have all Dells in the Enterprise. Would i just change the name to Dell?

Thanks for the information above.

Share this post


Link to post
Share on other sites

I have no Dell to test it but the following script should work ...... now for Lenovo, HP and Dell

 

$lenovo = gwmi -Namespace root\wmi -Class Lenovo_BiosSetting -ErrorAction SilentlyContinue | Where-Object {$_.CurrentSetting -clike "*SATA*AHCI*"}

$hp = gwmi -Namespace root\hp\instrumentedBIOS -Class HP_BIOSSetting -ErrorAction SilentlyContinue | Where-Object {$_.CurrentValue -eq "AHCI"}

$dell = gwmi -Namespace root\dellomci -Class Dell_SMBIOSSettings -ErrorAction SilentlyContinue | Where-Object {$_.IntegratedSATAController -eq "AHCI"}

if( ( $lenovo -is [Object] ) -or ( $hp -is [Object] ) -or ( $dell -is [Object] ) ){

return($true)

}

return($false)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...