Setting BIOS attributes in a system running Windows using PowerShell commands
You can set BIOS attributes using the SetBIOSAttributes method. The procedure is explained below using a task of enabling the Trusted Platform Module (TPM) as an example.
NOTE Make sure the TPM option is cleared in the BIOS before following the procedure to enable the TPM.
NOTE Use PowerShell with Administrator privileges.
To enable TPM,
Set the BIOS password on the system if not set already using the following PowerShell command:
Powershell PSReadline module saves every console command that you enter to a text file. So it is recommended to use "Get-Credential" comandlet to handle the password securely.
$cred = Get-Credential
Enter your username and password, for example, AdminPWD and Dell_123$, when the dialog box is displayed.