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

检查 BIOS 密码是否已设置

Summary: 此脚本示例演示如何确认是否在戴尔客户端系统上设置了 BIOS 级别密码。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

此脚本示例演示如何确认是否在戴尔客户端系统上设置了 BIOS 级别密码。此脚本要求 Dell Command |显示器 (DCM)(以前称为 OMCI)已安装在系统上。此脚本查询 Dell 命名空间 root\dcim\sysman 中的 WMI 类DCIM_BiosPassword。如果系统上安装了 DCM,WMI 命名空间 root\dcim\sysman 可用。

BIOS 管理员密码报告为“AdminPwd”,BIOS 系统密码报告为“SystemPwd”。 

脚本

<#
.概要
确认是否在戴尔客户端系统上设置了 BIOS 级别密码。   
.说明
:此脚本查询 Dell
命名空间 root\dcim\sysman 中的 WMI 类DCIM_BiosPassword。如果系统上安装了 DCM,则命名空间 root\dcim\sysman 可用

    BIOS 管理员密码报告为“AdminPwd”,BIOS 系统密码
报告为“SystemPwd”。

#>

$dcm = Get-CimInstance -Namespace root -Class __Namespace | where-object Name -eq DCIM
if (!$dcm) {
    Write-Output “DCM is not installed.正在退出......”
    return
}
$passwords = Get-CimInstance -Namespace root\dcim\sysman -classname dcim_biospassword
$passwords | foreach-Object {
$output = $_.AttributeName
  
if ($_.IsSet -match “True”) {
$output += “ is set on $env:COMPUTERNAME.”
        }
elseif ($_.IsSet -match “False”) {
$output += “ is not set on $env:COMPUTERNAME.”
        }
else
{
}
        Write-Output $output

Article Properties
Article Number: 000146401
Article Type: Solution
Last Modified: 21 Feb 2021
Version:  3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.