650 lines
33 KiB
C#
650 lines
33 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2009-2013 All Rights Reserved.
|
|
//
|
|
// File: HardwareAssetFunctionality.cs
|
|
//
|
|
// Contents: High Level API command line sample: HardwareAsset Functionality
|
|
//
|
|
// Notes:
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
using System;
|
|
using Intel.Manageability;
|
|
using Intel.Manageability.HardwareAssets;
|
|
using Intel.Manageability.Exceptions;
|
|
|
|
namespace HardwareAssetSample
|
|
{
|
|
public class HardwareAssetFunctionality
|
|
{
|
|
public static void PrintBIOSes_Info(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
BIOSInfo[] bi = amt.HardwareAsset.BIOSesInfo;
|
|
Console.WriteLine("\nBIOSes Info\n~~~~~~~~~~~");
|
|
for (int i = 0; i < bi.Length; i++)
|
|
{
|
|
Console.WriteLine("--- BIOS Info #{0} ---", i + 1);
|
|
Console.WriteLine("\tVendor = {0}", bi[i].Vendor);
|
|
Console.WriteLine("\tVersion = {0}", bi[i].Version);
|
|
Console.WriteLine("\tReleaseDate = {0}", bi[i].ReleaseDate);
|
|
Console.WriteLine("\tBIOS_characteristics_not_supported = {0}", bi[i].BIOS_characteristics_not_supported);
|
|
Console.WriteLine("\tISA = {0}", bi[i].ISA);
|
|
Console.WriteLine("\tMCA = {0}", bi[i].MCA);
|
|
Console.WriteLine("\tEISA = {0}", bi[i].EISA);
|
|
Console.WriteLine("\tPCI = {0}", bi[i].PCI);
|
|
Console.WriteLine("\tPC_card = {0}", bi[i].PC_card);
|
|
Console.WriteLine("\tPnP = {0}", bi[i].PnP);
|
|
Console.WriteLine("\tAPM = {0}", bi[i].APM);
|
|
Console.WriteLine("\tBIOS_upgradeable = {0}", bi[i].BIOS_upgradeable);
|
|
Console.WriteLine("\tBIOS_shadowing_allowed = {0}", bi[i].BIOS_shadowing_allowed);
|
|
Console.WriteLine("\tVL_VESA = {0}", bi[i].VL_VESA);
|
|
Console.WriteLine("\tESCD = {0}", bi[i].ESCD);
|
|
Console.WriteLine("\tCD_Boot = {0}", bi[i].CD_Boot);
|
|
Console.WriteLine("\tSelectable_boot = {0}", bi[i].Selectable_boot);
|
|
Console.WriteLine("\tBIOS_ROM_socketed = {0}", bi[i].BIOS_ROM_socketed);
|
|
Console.WriteLine("\tBoot_from_PC_card = {0}", bi[i].Boot_from_PC_card);
|
|
Console.WriteLine("\tEDD_spec = {0}", bi[i].EDD_spec);
|
|
Console.WriteLine("\tNEC_PC_98 = {0}", bi[i].NEC_PC_98);
|
|
Console.WriteLine("\tPCMCIA = {0}", bi[i].PCMCIA);
|
|
Console.WriteLine("\tLS_120_Boot = {0}", bi[i].LS_120_Boot);
|
|
Console.WriteLine("\tACPI = {0}", bi[i].ACPI);
|
|
Console.WriteLine("\tI2O_Boot = {0}", bi[i].I2O_Boot);
|
|
Console.WriteLine("\tUSB_Legacy = {0}", bi[i].USB_Legacy);
|
|
Console.WriteLine("\tAGP = {0}", bi[i].AGP);
|
|
Console.WriteLine("\tIR = {0}", bi[i].IR);
|
|
Console.WriteLine("\tIEEE_1394 = {0}", bi[i].IEEE_1394);
|
|
Console.WriteLine("\tI2C = {0}", bi[i].I2C);
|
|
Console.WriteLine("\tSmart_Battery = {0}", bi[i].Smart_Battery);
|
|
Console.WriteLine("\tATAPI_ZIP_Drive_Boot = {0}", bi[i].ATAPI_ZIP_Drive_Boot);
|
|
Console.WriteLine("\tIEEE_1394_Boot = {0}", bi[i].IEEE_1394_Boot);
|
|
Console.WriteLine("\tEnable_Targeted_Content_Distribution = {0}", bi[i].Enable_Targeted_Content_Distribution);
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintComputerSystem(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
ComputerSystem cs = amt.HardwareAsset.ComputerSystem;
|
|
Console.WriteLine("\nComputer System \n~~~~~~~~~~~~~~~");
|
|
|
|
Console.WriteLine("\tManufacturer = {0}", cs.Manufacturer);
|
|
Console.WriteLine("\tProduct = {0}", cs.Product);
|
|
Console.WriteLine("\tVersion = {0}", cs.Version);
|
|
Console.WriteLine("\tSerialNumber = {0}", cs.SerialNumber);
|
|
Console.WriteLine("\tUUID = {0}", cs.UUID);
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintBaseboards(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
BaseBoard[] bb = amt.HardwareAsset.BaseBoards;
|
|
Console.WriteLine("\nBaseboards\n~~~~~~~~~~~");
|
|
|
|
for (int i = 0; i < bb.Length; i++)
|
|
{
|
|
Console.WriteLine("--- Baseboard #{0} ---", i + 1);
|
|
Console.WriteLine("\tManufacturer = {0}", bb[i].Manufacturer);
|
|
Console.WriteLine("\tProduct = {0}", bb[i].Product);
|
|
Console.WriteLine("\tVersion = {0}", bb[i].Version);
|
|
Console.WriteLine("\tSerialNumber = {0}", bb[i].SerialNumber);
|
|
Console.WriteLine("\tAssetTag = {0}", bb[i].AssetTag);
|
|
Console.WriteLine("\tReplaceable = {0}", bb[i].Replaceable);
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintProcessors(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
Processor[] CPUs = amt.HardwareAsset.CPUs;
|
|
Console.WriteLine("\nCPUs\n~~~~");
|
|
for (int i = 0; i < CPUs.Length; i++)
|
|
{
|
|
Console.WriteLine("--- CPU #{0} ---", i + 1);
|
|
Console.WriteLine("\tStatus = {0}", CPUs[i].Status);
|
|
Console.WriteLine("\tRole = {0}", CPUs[i].Role);
|
|
Console.WriteLine("\tFamily = {0}", CPUs[i].Family);
|
|
Console.WriteLine("\tUpgradeInformation = {0}", CPUs[i].UpgradeInformation);
|
|
Console.WriteLine("\tManufacturer = {0}", CPUs[i].Manufacturer);
|
|
Console.WriteLine("\tVersion = {0}", CPUs[i].Version);
|
|
Console.WriteLine("\tPhysicalPosition = {0}", CPUs[i].PhysicalPosition);
|
|
Console.WriteLine("\tMaxClockSpeed = {0}", CPUs[i].MaxClockSpeed);
|
|
Console.WriteLine("\tCurrentClockSpeed = {0}", CPUs[i].CurrentClockSpeed);
|
|
Console.WriteLine("\tStepping = {0}", CPUs[i].Stepping);
|
|
Console.WriteLine("\tExternalBusClockSpeed = {0}", CPUs[i].ExternalBusClockSpeed);
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintMemoryModules(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
MemoryModule[] MemoryModules = amt.HardwareAsset.MemoryModules;
|
|
Console.WriteLine("\nMemory Modules\n~~~~~~~~~~~~~~");
|
|
for (int i = 0; i < MemoryModules.Length; i++)
|
|
{
|
|
Console.WriteLine("--- Memory Module #{0} ---", i + 1);
|
|
Console.WriteLine("\tForm factor = {0}", MemoryModules[i].FormFactor);
|
|
Console.WriteLine("\tMemory type = {0}", MemoryModules[i].Type);
|
|
Console.WriteLine("\tSpeed = {0} nanoseconds", MemoryModules[i].Speed);
|
|
Console.WriteLine("\tManufacturer = {0}", MemoryModules[i].Manufacturer);
|
|
Console.WriteLine("\tSerialNumber = {0}", MemoryModules[i].SerialNumber);
|
|
Console.WriteLine("\tAssetTag = {0}", MemoryModules[i].AssetTag);
|
|
Console.WriteLine("\tPartNumber = {0}", MemoryModules[i].PartNumber);
|
|
Console.WriteLine("\tCapacity = {0} bytes", MemoryModules[i].Capacity);
|
|
Console.WriteLine("\tBankLabel = {0}", MemoryModules[i].BankLabel);
|
|
Console.WriteLine("\tConfiguredMemoryClockSpeed = {0}", MemoryModules[i].ConfiguredMemoryClockSpeed);
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintFRUs(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
FieldReplaceableUnit[] FRUs = amt.HardwareAsset.FRUs;
|
|
Console.WriteLine("\nFRUs\n~~~~");
|
|
if (FRUs == null || FRUs.Length == 0)
|
|
{
|
|
Console.WriteLine("--- No Field Replaceable Units Information Available ---\n");
|
|
return;
|
|
}
|
|
for (int i = 0; i < FRUs.Length; i++)
|
|
{
|
|
Console.WriteLine("--- Field Replaceable Unit #{0} ---", i + 1);
|
|
Console.WriteLine("\tProtocol Supported = {0}", FRUs[i].ProtocolSupported);
|
|
Console.WriteLine("\tVendorID = {0}", FRUs[i].VendorID);
|
|
Console.WriteLine("\tDeviceID = {0}", FRUs[i].DeviceID);
|
|
Console.WriteLine("\tRevisionID = {0}", FRUs[i].RevisionID);
|
|
Console.WriteLine("\tProgIf = {0}", FRUs[i].ProgIf);
|
|
Console.WriteLine("\tSubclass = {0}", FRUs[i].Subclass);
|
|
Console.WriteLine("\tClassCode = {0}", FRUs[i].ClassCode);
|
|
Console.WriteLine("\tSubvendorID = {0}", FRUs[i].SubvendorID);
|
|
Console.WriteLine("\tSubsystemID = {0}", FRUs[i].SubsystemID);
|
|
Console.WriteLine("\tDeviceLocation = {0}", FRUs[i].DeviceLocation);
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintMediaDevices(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
MediaDevice[] MediaDevices = amt.HardwareAsset.MediaDevices;
|
|
Console.WriteLine("\nMedia Devices\n~~~~~~~~~~~~~");
|
|
for (int i = 0; i < MediaDevices.Length; i++)
|
|
{
|
|
Console.WriteLine("--- Media Device #{0} ---", i + 1);
|
|
Console.WriteLine("\tMaxMediaSize = {0} bytes", MediaDevices[i].MaxMediaSize);
|
|
Console.WriteLine("\tSerialNumber = {0}", MediaDevices[i].SerialNumber);
|
|
Console.WriteLine("\tModelNumber = {0}", MediaDevices[i].ModelNumber);
|
|
Console.WriteLine("\tCapabilities:");
|
|
if (MediaDevices[i].Capabilities.Unknown)
|
|
Console.WriteLine("\t\tUnknown");
|
|
if (MediaDevices[i].Capabilities.Other)
|
|
Console.WriteLine("\t\tOther");
|
|
if (MediaDevices[i].Capabilities.Sequential_Access)
|
|
Console.WriteLine("\t\tSequential_Access");
|
|
if (MediaDevices[i].Capabilities.Random_Access)
|
|
Console.WriteLine("\t\tRandom_Access");
|
|
if (MediaDevices[i].Capabilities.Writable)
|
|
Console.WriteLine("\t\tWritable");
|
|
if (MediaDevices[i].Capabilities.Encryption)
|
|
Console.WriteLine("\t\tEncryption");
|
|
if (MediaDevices[i].Capabilities.Compression)
|
|
Console.WriteLine("\t\tCompression");
|
|
if (MediaDevices[i].Capabilities.Removable_Media)
|
|
Console.WriteLine("\t\tRemovable_Media");
|
|
if (MediaDevices[i].Capabilities.Manual_Cleaning)
|
|
Console.WriteLine("\t\tManual_Cleaning");
|
|
if (MediaDevices[i].Capabilities.Automatic_Cleaning)
|
|
Console.WriteLine("\t\tAutomatic_Cleaning");
|
|
if (MediaDevices[i].Capabilities.SMART_Notification)
|
|
Console.WriteLine("\t\tSMART_Notification");
|
|
if (MediaDevices[i].Capabilities.Dual_Sided_Media)
|
|
Console.WriteLine("\t\tDual_Sided_Media");
|
|
if (MediaDevices[i].Capabilities.Predismount_Eject_Not_Required)
|
|
Console.WriteLine("\t\tPredismount_Eject_Not_Required");
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintSensors(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
Sensor[] Sensors = amt.HardwareAsset.Sensors;
|
|
Console.WriteLine("\nSensors\n~~~~~~~~");
|
|
for (int i = 0; i < Sensors.Length; i++)
|
|
{
|
|
Console.WriteLine("--- Sensor #{0} ---", i + 1);
|
|
Console.WriteLine("\tName = {0}", Sensors[i].Name);
|
|
Console.WriteLine("\tID = {0}", Sensors[i].ID);
|
|
Console.WriteLine("\tSensorType = {0}", Sensors[i].SensorType);
|
|
for (int j = 0; j < Sensors[i].PossibleStates.Length; j++)
|
|
{
|
|
Console.WriteLine("\tPossibleStates[{0}] = {1}", j, Sensors[i].PossibleStates[j]);
|
|
}
|
|
Console.WriteLine("\tCurrentState = {0}", Sensors[i].CurrentState);
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintFans(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
Fan[] fans = amt.HardwareAsset.Fans;
|
|
Console.WriteLine("\nFans\n~~~~");
|
|
|
|
for (int i = 0; i < fans.Length; i++)
|
|
{
|
|
if (fans[i] != null)
|
|
{
|
|
Console.WriteLine("--- Fan #{0} ---", i + 1);
|
|
if (!fans[i].DataValid)
|
|
{
|
|
Console.WriteLine("\tNo fan data avaliable");
|
|
return;
|
|
}
|
|
Console.WriteLine("\tDeviceID = {0}", fans[i].DeviceID);
|
|
Console.WriteLine("\tDesiredSpeed = {0} RPM", fans[i].DesiredSpeed);
|
|
if (fans[i].ActiveCooling)
|
|
Console.WriteLine("\tActiveCooling");
|
|
if (fans[i].VariableSpeed)
|
|
Console.WriteLine("\tVariableSpeed");
|
|
}
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintPowerSupplies(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
PowerSupply[] ps = amt.HardwareAsset.PowerSupplies;
|
|
Console.WriteLine("\nPowerSupplies\n~~~~~~~~~~~~~");
|
|
for (int i = 0; i < ps.Length; i++)
|
|
{
|
|
Console.WriteLine("--- nPowerSupply #{0} ---", i + 1);
|
|
if (!ps[i].DataValid)
|
|
{
|
|
Console.WriteLine("\tNo power supply data avaliable");
|
|
return;
|
|
}
|
|
Console.WriteLine("\tDeviceID = {0}", ps[i].DeviceID);
|
|
Console.WriteLine("\tTotalOutputPower = {0} milliwatts", ps[i].TotalOutputPower);
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintBatteriesEx(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
PortableBatteryEx[] batteries = amt.HardwareAsset.BatteriesEx;
|
|
Console.WriteLine("\nBatteries\n~~~~~~~~~~~~~");
|
|
if (batteries != null)
|
|
{
|
|
for (int i = 0; i < batteries.Length; i++)
|
|
{
|
|
Console.WriteLine("--- Batteries #{0} ---", i + 1);
|
|
Console.WriteLine("\tStatus = {0}", batteries[i].Status.ToString());
|
|
Console.WriteLine("\tChemistry = {0}", batteries[i].Chemistry.ToString());
|
|
Console.WriteLine("\tManufacturer = {0}", batteries[i].Manufacturer);
|
|
Console.WriteLine("\tSerialNumber = {0}", batteries[i].SerialNumber);
|
|
Console.WriteLine("\tDesignVoltage = {0}", batteries[i].DesignVoltage);
|
|
Console.WriteLine("\tEstimatedChargeRemaining = {0}", batteries[i].EstimatedChargeRemaining);
|
|
Console.WriteLine("\tFullChargeCapacity = {0}", batteries[i].FullChargeCapacity);
|
|
}
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get battery information from the Intel AMT.");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintBatteries(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
PortableBattery[] batteries = amt.HardwareAsset.Batteries;
|
|
Console.WriteLine("\nBatteries\n~~~~~~~~~~~~~");
|
|
if (batteries != null)
|
|
{
|
|
for (int i = 0; i < batteries.Length; i++)
|
|
{
|
|
Console.WriteLine("--- Batteries #{0} ---", i + 1);
|
|
Console.WriteLine("\tDeviceName = {0}", batteries[i].DeviceName);
|
|
Console.WriteLine("\tManufacturer = {0}", batteries[i].Manufacturer);
|
|
Console.WriteLine("\tManufactureDate = {0}", batteries[i].ManufactureDate);
|
|
Console.WriteLine("\tLocation = {0}", batteries[i].Location);
|
|
Console.WriteLine("\tSerialNumber = {0}", batteries[i].SerialNumber);
|
|
Console.WriteLine("\tSBDSVersionNumber = {0}", batteries[i].SBDSVersionNumber);
|
|
Console.WriteLine("\tSBDSSerialNumber = {0}", batteries[i].SBDSSerialNumber);
|
|
Console.WriteLine("\tSBDSDeviceChemistry = {0}", batteries[i].SBDSDeviceChemistry);
|
|
Console.WriteLine("\tOEMSpecific = {0}", batteries[i].OEMSpecific);
|
|
Console.WriteLine("\tMaximumErrorInBatteryData = {0}",
|
|
batteries[i].MaximumErrorInBatteryData);
|
|
Console.WriteLine("\tDeviceChemistryX = {0}", batteries[i].DeviceChemistryX);
|
|
Console.WriteLine("\tDesignVoltage = {0}", batteries[i].DesignVoltage);
|
|
Console.WriteLine("\tDesignCapacityMultiplier = {0}", batteries[i].DesignCapacityMultiplier);
|
|
Console.WriteLine("\tDesignCapacity = {0}", batteries[i].DesignCapacity);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Console.WriteLine("There is no Batteries data.");
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintVproVerificationTable(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
VproVerificationTable VproTable = amt.HardwareAsset.VproTable;
|
|
Console.WriteLine("\nvPro Verification Table\n~~~~~~~~~~~~~~~~~~~~~~~");
|
|
|
|
if (!VproTable.TableValid)
|
|
{
|
|
Console.WriteLine("\tNo information available.");
|
|
return;
|
|
}
|
|
|
|
Console.WriteLine("\t--- CPU Capabilities ---");
|
|
Console.WriteLine("\t\tVMX_enabled = {0}", VproTable.Cpu.VMX_enabled);
|
|
Console.WriteLine("\t\tSMX_enabled = {0}", VproTable.Cpu.SMX_enabled);
|
|
Console.WriteLine("\t\tLT_TXT_available = {0}", VproTable.Cpu.LT_TXT_available);
|
|
Console.WriteLine("\t\tLT_TXT_enabled = {0}", VproTable.Cpu.LT_TXT_enabled);
|
|
Console.WriteLine("\t\tVTx_available = {0}", VproTable.Cpu.VTx_available);
|
|
Console.WriteLine("\t\tVTx_enabled = {0}", VproTable.Cpu.VTx_enabled);
|
|
Console.WriteLine("\t\tNumReserved = {0}", VproTable.Cpu.NumReserved);
|
|
|
|
Console.WriteLine("\t--- Chipset Capabilities ---");
|
|
Console.WriteLine("\t\tPCI_Device_Function_Number = {0}", VproTable.Chipset.PCI_Device_Function_Number);
|
|
Console.WriteLine("\t\tPCI_Device_Device_Number = {0}", VproTable.Chipset.PCI_Device_Device_Number);
|
|
Console.WriteLine("\t\tPCI_Device_Bus_Number = {0}", VproTable.Chipset.PCI_Device_Bus_Number);
|
|
Console.WriteLine("\t\tPCI_Device_ID_Number = {0}", VproTable.Chipset.PCI_Device_ID_Number);
|
|
Console.WriteLine("\t\tVTd_available = {0}", VproTable.Chipset.VTd_available);
|
|
Console.WriteLine("\t\tVTd_enabled = {0}", VproTable.Chipset.VTd_enabled);
|
|
Console.WriteLine("\t\tTXT_available = {0}", VproTable.Chipset.TXT_available);
|
|
Console.WriteLine("\t\tTXT_enabled = {0}", VproTable.Chipset.TXT_enabled);
|
|
|
|
Console.WriteLine("\t--- ICH Capabilities ---");
|
|
Console.WriteLine("\t\tPCI_Device_Function_Number = {0}", VproTable.Ich.PCI_Device_Function_Number);
|
|
Console.WriteLine("\t\tPCI_Device_Device_Number = {0}", VproTable.Ich.PCI_Device_Device_Number);
|
|
Console.WriteLine("\t\tPCI_Device_Bus_Number = {0}", VproTable.Ich.PCI_Device_Bus_Number);
|
|
Console.WriteLine("\t\tPCI_Device_ID_Number = {0}", VproTable.Ich.PCI_Device_ID_Number);
|
|
|
|
Console.WriteLine("\t--- ME Capabilities ---");
|
|
Console.WriteLine("\t\tMeEnabled = {0}", VproTable.Me.MeEnabled);
|
|
Console.WriteLine("\t\tQST_FW_supported = {0}", VproTable.Me.QST_FW_supported);
|
|
Console.WriteLine("\t\tASF_FW_supported = {0}", VproTable.Me.ASF_FW_supported);
|
|
Console.WriteLine("\t\tAMT_FW_supported = {0}", VproTable.Me.AMT_FW_supported);
|
|
Console.WriteLine("\t\tStandard_Manageability_supported = {0}", VproTable.Me.Standard_Manageability_supported);
|
|
Console.WriteLine("\t\tSmall_Buisness_supported = {0}", VproTable.Me.Small_Buisness_supported);
|
|
Console.WriteLine("\t\tManageability_Upgrade_supported = {0}", VproTable.Me.Manageability_Upgrade_supported);
|
|
Console.WriteLine("\t\tAT_supported = {0}", VproTable.Me.AT_supported);
|
|
Console.WriteLine("\t\tKVM_supported = {0}", VproTable.Me.KVM_supported);
|
|
Console.WriteLine("\t\tLocal_Wakeup_Timer_supported = {0}", VproTable.Me.Local_Wakeup_Timer_supported);
|
|
Console.WriteLine("\t\t--- Firmware Version ---");
|
|
Console.WriteLine("\t\t\tMajorVersion = {0}", VproTable.Me.FWVersion.MajorVersion);
|
|
Console.WriteLine("\t\t\tMinorVersion = {0}", VproTable.Me.FWVersion.MinorVersion);
|
|
Console.WriteLine("\t\t\tBuild = {0}", VproTable.Me.FWVersion.Build);
|
|
Console.WriteLine("\t\t\tHotfix = {0}", VproTable.Me.FWVersion.Hotfix);
|
|
|
|
Console.WriteLine("\t--- TPM Capabilities ---");
|
|
Console.WriteLine("\t\tTPM_on_board = {0}", VproTable.Tpm.TPM_on_board);
|
|
Console.WriteLine("\t\tTPM_enabled = {0}", VproTable.Tpm.TPM_enabled);
|
|
Console.WriteLine("\t\tTCG_Spec_Major_Version = {0}", VproTable.Tpm.TCG_Spec_Major_Version);
|
|
Console.WriteLine("\t\tTCG_Spec_Minor_Version = {0}", VproTable.Tpm.TCG_Spec_Minor_Version);
|
|
|
|
if (amt.MajorVersion >= 8)
|
|
{
|
|
Console.WriteLine("\t--- MEBX Version ---");
|
|
Console.WriteLine("\t\tMajorVersion = {0}", VproTable.MebxVersion.MajorVersion);
|
|
Console.WriteLine("\t\tMinorVersion = {0}", VproTable.MebxVersion.MinorVersion);
|
|
Console.WriteLine("\t\tBuild = {0}", VproTable.MebxVersion.Build);
|
|
Console.WriteLine("\t\tHotfix = {0}", VproTable.MebxVersion.Hotfix);
|
|
|
|
Console.WriteLine("\t--- Platform Configuration State ---");
|
|
Console.WriteLine("\t\tATConfigurationState = {0}", VproTable.ConfigurationState.AT);
|
|
|
|
}
|
|
|
|
Console.WriteLine("\t--- Network Devices ---");
|
|
Console.WriteLine("\t\tPCI_Device_Function_Number = {0}", VproTable.NetDevs.PCI_Device_Function_Number);
|
|
Console.WriteLine("\t\tPCI_Device_Device_Number = {0}", VproTable.NetDevs.PCI_Device_Device_Number);
|
|
Console.WriteLine("\t\tPCI_Device_Bus_Number = {0}", VproTable.NetDevs.PCI_Device_Bus_Number);
|
|
Console.WriteLine("\t\tPCI_Device_ID_Number = {0}", VproTable.NetDevs.PCI_Device_ID_Number);
|
|
Console.WriteLine("\t\tWiredNIC = {0}", VproTable.NetDevs.WiredNIC);
|
|
Console.WriteLine("\t\tWirelessNIC1 = {0}", VproTable.NetDevs.WirelessNIC1);
|
|
Console.WriteLine("\t\tWirelessNIC2 = {0}", VproTable.NetDevs.WirelessNIC2);
|
|
|
|
Console.WriteLine("\t--- BIOS Capabilities ---");
|
|
Console.WriteLine("\t\tCan_Setup_VTd = {0}", VproTable.Bios.Can_Setup_VTd);
|
|
Console.WriteLine("\t\tCan_Setup_VTx = {0}", VproTable.Bios.Can_Setup_VTx);
|
|
Console.WriteLine("\t\tCan_Setup_TXT = {0}", VproTable.Bios.Can_Setup_TXT);
|
|
Console.WriteLine("\t\tCan_Setup_TPM = {0}", VproTable.Bios.Can_Setup_TPM);
|
|
Console.WriteLine("\t\tCan_Setup_ME = {0}", VproTable.Bios.Can_Setup_ME);
|
|
Console.WriteLine("\t\tVA_Extensions = {0}", VproTable.Bios.VA_Extensions);
|
|
Console.WriteLine("\t\tSPI_Flash_Reserves_Platform_Data_Region = {0}",
|
|
VproTable.Bios.SPI_Flash_Reserves_Platform_Data_Region);
|
|
if (VproTable.Bios.VA_Version == VproVerificationTable.BiosCapabilities.VA_VersionEnum.Other)
|
|
{
|
|
Console.WriteLine("\t\tVA_Version = {0}, Raw_VA_Version = {1}",
|
|
VproTable.Bios.VA_Version, VproTable.Bios.Raw_VA_Version);
|
|
}
|
|
else
|
|
{
|
|
Console.WriteLine("\t\tVA_Version = {0}", VproTable.Bios.VA_Version);
|
|
}
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void PrintAmtInformation(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
AmtInformation AmtInfo = amt.HardwareAsset.AmtInfo;
|
|
Console.WriteLine("\nAmtInfo\n~~~~~~~");
|
|
if (!AmtInfo.InformationValid)
|
|
{
|
|
Console.WriteLine("\tNo AmtInfo information available");
|
|
return;
|
|
}
|
|
|
|
if (AmtInfo.AmtSupported)
|
|
Console.WriteLine("\tAMT Supported");
|
|
else
|
|
Console.WriteLine("\tAMT Not Supported");
|
|
|
|
if (AmtInfo.AmtEnabled)
|
|
Console.WriteLine("\tAMT Enabled");
|
|
else
|
|
Console.WriteLine("\tAMT Disabled");
|
|
|
|
if (AmtInfo.IDEREnabled)
|
|
Console.WriteLine("\tIDER Enabled");
|
|
else
|
|
Console.WriteLine("\tIDER Disabled");
|
|
|
|
if (AmtInfo.SOLEnabled)
|
|
Console.WriteLine("\tSOL Enabled");
|
|
else
|
|
Console.WriteLine("\tSOL Disabled");
|
|
|
|
if (AmtInfo.NetworkEnabled)
|
|
Console.WriteLine("\tNetwork Enabled");
|
|
else
|
|
Console.WriteLine("\tNetwork Disabled");
|
|
|
|
Console.WriteLine("\tExtended Data = {0}", AmtInfo.ExtendedData);
|
|
|
|
// OEMCapabities:
|
|
if (AmtInfo.IDE_Redirection_available)
|
|
Console.WriteLine("\tIDE_Redirection_available");
|
|
if (AmtInfo.SOL_available)
|
|
Console.WriteLine("\tSOL_available");
|
|
if (AmtInfo.BIOS_Reflash_available)
|
|
Console.WriteLine("\tBIOS_Reflash_available");
|
|
if (AmtInfo.BIOS_Boot_Into_Setup_Screen_available)
|
|
Console.WriteLine("\tBIOS_Boot_Into_Setup_Screen_available");
|
|
if (AmtInfo.BIOS_Pause_Before_Booting_available)
|
|
Console.WriteLine("\tBIOS_Pause_Before_Booting_available");
|
|
if (AmtInfo.BIOS_Boot_From_Floppy_available)
|
|
Console.WriteLine("\tBIOS_Boot_From_Floppy_availalble");
|
|
if (AmtInfo.BIOS_Boot_From_CD_available)
|
|
Console.WriteLine("\tBIOS_Boot_From_CD_available");
|
|
if (AmtInfo.KVM_available)
|
|
Console.WriteLine("\tKVM_available");
|
|
|
|
if (AmtInfo.BIOS_Screen != AmtInformation.BIOS_ScreenEnum.Unsupported)
|
|
Console.WriteLine("\tBIOS Screen: {0}", AmtInfo.BIOS_Screen);
|
|
|
|
//OCR Capabilities
|
|
if (AmtInfo.TbtDock_enabled)
|
|
Console.WriteLine("\tThunderbolt_Dock_enabled");
|
|
if (AmtInfo.ForceUEFIHTTPSBoot_supported)
|
|
Console.WriteLine("\tForce_UEFI_HTTPS_Boot_supported");
|
|
if (AmtInfo.ForceUEFIPBABoot_supported)
|
|
Console.WriteLine("\tForce_UEFI_PBA_Boot_supported");
|
|
if (AmtInfo.ForceWinREBoot_supported)
|
|
Console.WriteLine("\tForce_UEFI_WinRE_Boot_supported");
|
|
if (AmtInfo.AMTSecureBootControl_supported)
|
|
Console.WriteLine("\tAMT_Secure_Boot_Control_supported");
|
|
if (AmtInfo.WifiProfileShare_supported)
|
|
Console.WriteLine("\tWifi_Profile_Share_supported");
|
|
|
|
if (AmtInfo.KVMEnabled)
|
|
Console.WriteLine("\tKVM Enabled");
|
|
else
|
|
Console.WriteLine("\tKVM Disabled");
|
|
|
|
//RPE Capabilities
|
|
if (AmtInfo.PyriteRevert_available)
|
|
Console.WriteLine("\tPyrite_Revert_available");
|
|
if (AmtInfo.SecureEraseAllSSDs_available)
|
|
Console.WriteLine("\tSecure_Erase_All_SSDs_available");
|
|
if (AmtInfo.TPMClear_available)
|
|
Console.WriteLine("\tTPM_Clear_available");
|
|
if (AmtInfo.OEMCustomAction_available)
|
|
Console.WriteLine("\tOEM_Custom_Action_available");
|
|
if (AmtInfo.ClearBIOSKVMVariables_available)
|
|
Console.WriteLine("\tClear_BIOS_KVM_Variables_available");
|
|
if (AmtInfo.BIOSReloadOfGoldenConfig_available)
|
|
Console.WriteLine("\tBIOS_Reload_Of_Golden_Config_available");
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to get information from the Intel AMT");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void EnableUpdateMediaTable(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
// Enable the update in all subsequent boots.
|
|
amt.HardwareAsset.SetUpdateMediaDeviceTableState(true, true);
|
|
Console.WriteLine("\nEnableUpdateMediaTable operation completed successfully");
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to enable table update");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
|
|
public static void DisableUpdateMediaTable(IAMTInstance amt)
|
|
{
|
|
try
|
|
{
|
|
// Disable the update in all subsequent boots.
|
|
amt.HardwareAsset.SetUpdateMediaDeviceTableState(false, true);
|
|
Console.WriteLine("\nDisableUpdateMediaTable operation completed successfully");
|
|
}
|
|
catch (ManageabilityException ex)
|
|
{
|
|
Console.WriteLine("Failed to disable table update");
|
|
Console.WriteLine("\n" + ex.Message);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|