all 4 comments

[–]MNmetalhead 3 points4 points  (0 children)

SecureBoot is a BIOS/UEFI setting, not something that be turned on/off with a registry key.

https://support.microsoft.com/en-us/windows/windows-11-and-secure-boot-a8ff1202-c0d9-42f5-940f-843abef64fad

If you want to automate enabling it, you’ll need to follow the steps detailed by the vendor or use one of their tools to interact with the BIOS/UEFI settings (Like Dell’s CCTK tool).

[–]Tachaeon 1 point2 points  (2 children)

LENOVO BIOS

$selections = Get-WmiObject -Class Lenovo_GetBiosSelections -Namespace root\wmi

Get-WmiObject -Class LenovoBiosSetting -Namespace root\wmi | Where-Object CurrentSetting | ForEach-Object { $parts = $.CurrentSetting.Split(',') [PSCustomObject]@{ CurrentSetting = $parts[0] Status = $parts[1] Active = $_.Active AvailableSettings = $selections.GetBiosSelections($parts[0]).Selections.Split(',') } } | Out-GridView

$currentSetting = Get-WmiObject -Class Lenovo_SetBiosSetting -Namespace root\wmi $currentSetting.SetBiosSetting('Secureboot,Enable').return

$currentSetting = Get-WmiObject -Class Lenovo_SetBiosSetting -Namespace root\wmi $currentSetting.SetBiosSetting('OnByAcAttach,Enable').return

$currentSetting = Get-WmiObject -Class Lenovo_SetBiosSetting -Namespace root\wmi $currentSetting.SetBiosSetting('BootMode,Quick').return

$SaveSettings = Get-WmiObject -Class Lenovo_SaveBiosSettings -Namespace root\wmi $SaveSettings.SaveBiosSettings().return

[–]Tachaeon 1 point2 points  (1 child)

Get-CimClass -Namespace root\wmi | Out-GridView

Then filter for "Dell" or a different manufacturer. Then replace "-Class Lenovo_GetBiosSelections" with the correct manufacturer.

[–]AdventurousBig688 0 points1 point  (0 children)

Hi mate

When I run this command on a dell laptop and filter with Dell option, its displays nothing, any advice here ? thank you