#68109 - 2002-07-13 12:26 AM
Need Some help
|
Anonymous
Anonymous
Unregistered
|
I need to read some BIOS information from script. Like Compaq S/N, CPU type, DISK types and so on.. Any suggestions would be appriciated. Thanks.
|
|
Top
|
|
|
|
#68112 - 2002-07-13 03:03 AM
Re: Need Some help
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
|
|
Top
|
|
|
|
#68113 - 2002-07-13 03:33 AM
Re: Need Some help
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Checkout: WBEM/WMI SMBIOS Provider and CIM_BIOSElement
See this URL for all the CIM classes ( CIM Classes )
Execute this script to see what you can get. Comment out the lines that produce no or undesirable output. Use the "Cim Classes" link to get the readable description for numeric properties. code:
$x = "CIM_BIOSElement" $obj = GetObject("winmgmts:").InstancesOf ($x) ? $x for each $item in $obj ? "Caption: " + $item.Caption ? "CodeSet: " + $item.CodeSet ? "Description: " + $item.Description ? "IdentificationCode: " + $item.IdentificationCode ? "InstallDate: " + $item.InstallDate ? "LanguageEdition: " + $item.LanguageEdition ? "Manufacturer: " + $item.Manufacturer ? "Name: " + $item.Name ? "OtherTargetOS: " + $item.OtherTargetOS ? "PrimaryBIOS: " + $item.PrimaryBIOS ? "SerialNumber: " + $item.SerialNumber ? "SoftwareElementID: " + $item.SoftwareElementID $x = $item.SoftwareElementState select case $x=0 $x=Deployable case $x=1 $x=Installable case $x=2 $x=Executable case $x=3 $x=Running endselect ? "SoftwareElementState: " + $x ? "Status: " + $item.Status ? "TargetOperatingSystem: " + $item.TargetOperatingSystem ? "Version: " + $item.Version ? next
$x = "CIM_Chip" $obj = GetObject("winmgmts:").InstancesOf ($x) ? $x for each $item in $obj ? "Caption: " + $item.Caption ? "CreationClassName: " + $item.CreationClassName ? "Description: " + $item.Description $x = $item.FormFactor select case $x=0 $x="Unknown" case $x=1 $x="Other" case $x=2 $x="SIP" case $x=3 $x="DIP" case $x=4 $x="ZIP" case $x=5 $x="SOJ" case $x=6 $x="Proprietary" case $x=7 $x="SIMM" case $x=8 $x="DIMM" case $x=9 $x="TSOP" case $x=10 $x="PGA" case $x=11 $x="RIMM" case $x=12 $x="SODIMM" case $x=13 $x="SRIMM" case $x=14 $x="SMD" case $x=15 $x="SSMP" case $x=16 $x="QFP" case $x=17 $x="TQFP" case $x=18 $x="SOIC" case $x=19 $x="LCC" case $x=20 $x="PLCC" case $x=21 $x="BGA" case $x=22 $x="FPBGA" case $x=23 $x="LGA" Endselect ? "FormFactor: " + $x ? "HotSwappable: " + $item.HotSwappable ? "InstallDate: " + $item.InstallDate ? "Manufacturer: " + $item.Manufacturer ? "Model: " + $item.Model ? "Name: " + $item.Name ? "OtherIdentifyingInfo: " + $item.OtherIdentifyingInfo ? "PartNumber: " + $item.PartNumber ? "PoweredOn: " + $item.PoweredOn ? "Removable: " + $item.Removable ? "Replaceable: " + $item.Replaceable ? "SerialNumber: " + $item.SerialNumber ? "SKU: " + $item.SKU ? "Status: " + $item.Status ? "Tag: " + $item.Tag ? "Version: " + $item.Version ? next
$x = "CIM_PhysicalComponent" $obj = GetObject("winmgmts:").InstancesOf ($x) ? $x for each $item in $obj ? "Caption: " + $item.Caption ? "CreationClassName: " + $item.CreationClassName ? "Description: " + $item.Description ? "HotSwappable: " + $item.HotSwappable ? "InstallDate: " + $item.InstallDate ? "Manufacturer: " + $item.Manufacturer ? "Model: " + $item.Model ? "Name: " + $item.Name ? "OtherIdentifyingInfo: " + $item.OtherIdentifyingInfo ? "PartNumber: " + $item.PartNumber ? "PoweredOn: " + $item.PoweredOn ? "Removable: " + $item.Removable ? "Replaceable: " + $item.Replaceable ? "SerialNumber: " + $item.SerialNumber ? "SKU: " + $item.SKU ? "Status: " + $item.Status ? "Tag: " + $item.Tag ? "Version: " + $item.Version ? next
$x = "CIM_Processor" $obj = GetObject("winmgmts:").InstancesOf ($x) ? $x for each $item in $obj ? "AddressWidth: " + $item.AddressWidth $x=$item.Availability select case $x=1 $x="Other" case $x=2 $x="Unknown" case $x=3 $x="Running/Full Power" case $x=4 $x="Warning" case $x=5 $x="In Test" case $x=6 $x="Not Applicable" case $x=7 $x="Power Off" case $x=8 $x="Off Line" case $x=9 $x="Off Duty" case $x=10 $x="Degraded" case $x=11 $x="Not Installed" case $x=12 $x="Install Error" case $x=13 $x="Power Save - Unknown, Device is known to be in a power" + " save mode, but its exact status in this mode is unknown." case $x=14 $x="Power Save - Low Power Mode, Device is in a power save" + " state but still functioning, and may exhibit degraded performance." case $x=15 $x="Power Save - Standby, Device is not functioning but could" + " be brought to full power 'quickly'." case $x=16 $x="Power Cycle" case $x=17 $x="Power Save - Warning, Device is in a warning state, though" + " also in a power save mode." case $x=18 $x="Paused" case $x=19 $x="Not Ready" case $x=20 $x="Not Configured" case $x=21 $x="Quiesced" endselect ? "Availability: " + $x ? "Caption: " + $item.Caption ? "ConfigManagerErrorCode: " + $item.ConfigManagerErrorCode ? "ConfigManagerUserConfig: " + $item.ConfigManagerUserConfig ? "CreationClassName: " + $item.CreationClassName ? "CurrentClockSpeed: " + $item.CurrentClockSpeed ? "DataWidth: " + $item.DataWidth ? "Description: " + $item.Description ? "DeviceID: " + $item.DeviceID ? "ErrorCleared: " + $item.ErrorCleared ? "ErrorDescription: " + $item.ErrorDescription ? "Family: " + $item.Family ? "InstallDate: " + $item.InstallDate ? "LastErrorCode: " + $item.LastErrorCode ? "LoadPercentage: " + $item.LoadPercentage ? "MaxClockSpeed: " + $item.MaxClockSpeed ? "Name: " + $item.Name ? "OtherFamilyDescription: " + $item.OtherFamilyDescription ? "PNPDeviceID: " + $item.PNPDeviceID ? "PowerManagementCapabilities: " + $item.PowerManagementCapabilities ? "PowerManagementSupported: " + $item.PowerManagementSupported ? "Role: " + $item.Role ? "Status: " + $item.Status ? "StatusInfo: " + $item.StatusInfo ? "Stepping: " + $item.Stepping ? "SystemCreationClassName: " + $item.SystemCreationClassName ? "SystemName: " + $item.SystemName ? "UniqueId: " + $item.UniqueId ? "UpgradeMethod: " + $item.UpgradeMethod next
[ 13 July 2002, 03:38: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#68114 - 2002-07-15 03:01 PM
Re: Need Some help
|
Anonymous
Anonymous
Unregistered
|
Thank you all for replying. I will try the suggestions and post results.
|
|
Top
|
|
|
|
#68115 - 2002-07-16 12:56 AM
Re: Need Some help
|
Josh Haynes
Fresh Scripter
Registered: 2002-07-12
Posts: 9
Loc: Medford, OR
|
sealeopard, I took a look at the code you provided and I didn't get much back. I ran it as is and I got a lot of empty returns after your : markes? Is there a reason for that? What did I do wrong? It looks like it is very usefull information if I could actualy pull it from my systems.
Thanks,
Josh
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 735 anonymous users online.
|
|
|