檢查是否已設定 BIOS 密碼

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

Acest articol se aplică pentru Acest articol nu se aplică pentru Acest articol nu este legat de un produs specific. Acest articol nu acoperă toate versiunile de produs existente.

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

Proprietăți articol
Article Number: 000146401
Article Type: Solution
Ultima modificare: 21 feb. 2021
Version:  3
Găsiți răspunsuri la întrebările dvs. de la alți utilizatori Dell
Servicii de asistență
Verificați dacă dispozitivul dvs. este acoperit de serviciile de asistență.