Jump to content


  • 0
MarshMan0331

Device Collection for BIOS Settings

Question

4 answers to this question

Recommended Posts

  • 0

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

  • 0

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

  • 0

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

  • 0

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
Answer this question...

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.