
:max_bytes(150000):strip_icc()/001_how-to-factory-reset-a-lenovo-laptop-5115817-5d54860ff4bb42e39a35e03984f58677.jpg)
When the script runs, it will write to a log file. You can then sort through the exported settings and either save them as a CSV file or add them to the $Settings array in the body of the script. The CsvPath parameter can also be specified to output the list of settings to a CSV file. "PhysicalPresenceForTpmProvision,Disable",Ī full list of configurable settings can be exported from a device by calling the script with the GetSettings parameter. "Physical Presence for Provisioning,Disabled",

"Intel(R) Virtualization Technology,Enabled", The settings should be in the format of “Setting Name,Setting Value” To specify settings in the script, look for the $Settings array near the top of the script. When using the script to set settings, the list of settings can either be specified in the script itself or in a CSV file. SystemManagementPassword – Used to specify the system management password.SupervisorPassword – Used to specify the supervisor password.Using this switch with the SetSettings switch will also cause the script to ignore any settings specified in the body of the script. If used with the SetSettings switch, this acts as the location where the script will read BIOS settings to be set from. If used with the GetSettings switch, this acts as the location where a list of current BIOS settings will be saved. CsvPath – Use this parameter to specify the location of a CSV file.SetDefaults – Use this parameter to instruct the script to set all BIOS settings to factory default values.Settings can be specified either in the body of the script or from a CSV file. SetSettings – Use this parameter to instruct the script to set specific BIOS settings.The settings will be displayed to the screen by default. GetSettings – Use this parameter to instruct the script to generate a list of all current BIOS settings.This script takes the basic commands and adds logic to allow for a more automated settings management process. Reboot and try againįor more detailed information on the Lenovo WMI interface, as well as a list of supported hardware models, refer to the official documentation. System Busy – There are pending setting changes.Access Denied – BIOS password not supplied or not correct.

$PasswordSet.SetBiosPassword("pap,OldPassword,NewPassword,ascii,us")įor reference, when calling the SetBiosSetting, SaveBiosSetting, LoadDefaultSettings or SetBiosPassword methods, the possible return values are:

$PasswordSet = Get-WmiObject -Namespace root\wmi -Class Lenovo_SetBiosPassword #Connect to the Lenovo_SetBiosPassword WMI class
