Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

檢查是否已設定 BIOS 密碼

Summary: 此指令檔範例示範如何確認是否已在 Dell 用戶端系統上設定 BIOS 層級密碼。

This article may have been automatically translated. If you have any feedback regarding its quality, please let us know using the form at the bottom of this page.

Article Content


Symptoms

此指令檔範例示範如何確認是否已在 Dell 用戶端系統上設定 BIOS 層級密碼。此腳本需要 Dell Command |先前稱為 OMCI 的顯示器 (DCM) 會安裝在系統上。此指令檔會查詢 Dell 命名空間 root\dcim\sysman 中的 WMI 類別DCIM_BiosPassword。如果 DCM 已安裝在系統上,則可使用 WMI 命名空間 root\dcim\sysman。

BIOS 系統管理員密碼會報告為「AdminPwd」,而 BIOS 系統密碼會報告為「SystemPwd」。 

腳本

<#
.概要
:確認是否已在 Dell 用戶端系統上設定 BIOS 層級密碼。   
.說明:
此指令檔會查詢 Dell
命名空間 root\dcim\sysman 中的 WMI 類別DCIM_BiosPassword。如果系統上已安裝 DCM,則可使用
命名空間 root\dcim\sysman。
    BIOS 系統管理員密碼會報告為「AdminPwd」,而 BIOS 系統密碼
會報告為「SystemPwd」。

#>

$dcm = Get-CimInstance -Namespace root -Class __Namespace | 其中物件 名稱 -eq DCIM
if (!$dcm) {
    Write-Output “DCM 未安裝。退出...”
    return
}
$passwords = Get-CimInstance -Namespace root\dcim\sysman -classname dcim_biospassword
$passwords | foreach-Object {
$output = $_。AttributeName
  
if ($_.IsSet -match “True”) {
$output += “ 設定於 $env:COMPUTERNAME」。
        }
elseif ($_.IsSet -match “False”) {
$output += “ 未在 $env:COMPUTERNAME 上設定。
        }
else
{
}
        Write-Output $output

Article Properties


Last Published Date

21 Feb 2021

Version

3

Article Type

Solution