Skip to main content

Dell Command | Monitor Version 10.10 User's Guide

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,

  1. Set the BIOS password on the system if not set already using the following PowerShell command:
    Get-CimInstance -Namespace root\dcim\sysman -ClassName DCIM_BIOSService | Invoke-CimMethod -MethodName SetBIOSAttributes -Arguments @{AttributeName=@("AdminPwd");AttributeValue=@("<Admin password>")}
  2. Enable TPM security using the following command:
    Get-CimInstance -Namespace root\dcim\sysman -ClassName DCIM_BIOSService | Invoke-CimMethod -MethodName SetBIOSAttributes -Arguments @{AttributeName=@("Trusted Platform Module ");AttributeValue=@("1");AuthorizationToken="<Admin password>"}
  3. Restart the system.
  4. Activate the TPM using the following command:
    Get-CimInstance -Namespace root\dcim\sysman -ClassName DCIM_BIOSService | Invoke-CimMethod -MethodName SetBIOSAttributes -Arguments @{AttributeName=@(" Trusted Platform Module Activation");AttributeValue=@("2");AuthorizationToken="<Admin password>"}
  5. Restart the system.
    Generic disclaimer

    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.

    1. $cred = Get-Credential

    2. Enter your username and password, for example, AdminPWD and Dell_123$, when the dialog box is displayed.

    3. $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($cred.Password)

    4. $plainpwd=[System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)

    5. Get-CimInstance -Namespace root\dcim\sysman -ClassName DCIM_BIOSService | Invoke-CimMethod MethodName SetBIOSAttributes -Arguments @{AttributeName=@("AdminPwd");AttributeValue=@(" $plainpwd ")}


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\