Skip to content

Device Collection for BIOS Settings

Featured Replies

Need help building a Device collection for Machines that have AHCI enabled in the SATA operation in the BIOS Settings.

 

Thanks

Garrett

 

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)

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)

  • Author

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.

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)

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.