Get Dell BIOS settings in a XML file

Summary: Get Dell BIOS settings in a XML file

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

-

Cause

-

Resolution

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()
}

Affected Products

Software
Article Properties
Article Number: 000147520
Article Type: Solution
Last Modified: 29 Jul 2025
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.