在 XML 文件中获取戴尔 BIOS 设置
摘要: 在 XML 文件中获取戴尔 BIOS 设置
本文适用于
本文不适用于
本文并非针对某种特定的产品。
本文并非包含所有产品版本。
症状
-
原因
-
解决方案
bios.xml
function CreateXml ()
{
# Create a new XML
# this is where the document will be saved:
# $pwd = $MyInvocation.MyCommand.Path
$pwd = Get-Location
$Path = "$pwd\bios.xml"
# get an XMLTextWriter to create the XML
$XmlWriter = New-Object System.XMl.XmlTextWriter($Path,$Null)
# choose a pretty formatting:
$xmlWriter.Formatting = 'Indented'
$xmlWriter.Indentation = 1
$XmlWriter.IndentChar = "`t"
# write the header
$xmlWriter.WriteStartDocument()
# set XSL statements
$xmlWriter.WriteProcessingInstruction("xml-stylesheet", "type='text/xsl' href='style.xsl'")
# create root element "BIOS"
$XmlWriter.WriteComment('List of BIOS attributes')
$xmlWriter.WriteStartElement('BIOS')
$XmlWriter.WriteAttributeString('Provider', 'DelllBIOSProvider')
$XmlWriter.WriteAttributeString('Drive', 'DellSmbios')
# close the "BIOS" node:
$xmlWriter.WriteEndElement()
# finalize the document:
$xmlWriter.WriteEndDocument()
$xmlWriter.Flush()
$xmlWriter.Close()
}
受影响的产品
Software文章属性
文章编号: 000147520
文章类型: Solution
上次修改时间: 29 7月 2025
版本: 5
从其他戴尔用户那里查找问题的答案
支持服务
检查您的设备是否在支持服务涵盖的范围内。