# https://github.com/iainbrighton/PScribo # help about_document
# create a folder to store generated documents $OutPath = "c:\temp\out" $exists = Test-Path-Path$OutPath if (!$exists) { $null = New-Item-Path$OutPath-ItemType Directory -Force }
# generate document Document 'BIOS' { # get an object with rich information $info = Get-WmiObject-Class Win32_BIOS
# find out the property names that have actual information $properties = $info | Get-Member-MemberType *property | Select-Object-ExpandProperty Name | Where-Object {
$info.$_-ne$null-and$info.$_-ne''
} | Sort-Object
# turn each property into a separate object $infos = $properties | ForEach-Object { [PSCustomObject]@{ Name = $_ Value = $info.$_ }
}
Paragraph -Style Heading1 "BIOS Information"
# generate a table with one line per property $infos | # select the properties to display, and the header texts to use Table -Columns Name,Value -Headers'Item','Content'-Width0