本文主要是介绍C# 获取计算机信息(操作系统/硬件),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
C#我们可以通过类库System.Management获取计算机的基础信息。总结了一个通用类,只要根据参考信息填入path和key就可以获取相应的信息。这个只是针对单个设备,如果有多个设备单独写下就可以了。参考信息中key的":"和后边为说明信息,只使用前面就可以了。
1.通用类和示例
1.1.通用类
/// <summary>/// 获取计算机硬件信息/// </summary>/// <param name="path">部件</param>/// <param name="key">键值</param>/// <returns></returns>public static string GetComputerHardWareInfo(string path,string key){try{ManagementClass managementClass = new ManagementClass(path);ManagementObjectCollection moc = managementClass.GetInstances();PropertyDataCollection properties = managementClass.Properties;foreach (var property in properties){if (property.Name == key){foreach (var mo in moc){return mo.Properties[property.Name].Value.ToString();}}}}catch (Exception){//记录异常信息}return string.Empty;}
1.2.示例
/// <summary>/// 获取CPU ID/// </summary>/// <returns></returns>public static string Get_CPU_ID() => GetComputerHardWareInfo("Win32_Processor", "ProcessorId");/// <summary>/// 获取主板序列号/// </summary>/// <returns></returns>public static string Get_Board_SN() => GetComputerHardWareInfo("Win32_BaseBoard", "SerialNumber");/// <summary>/// 获取硬盘序列号/// </summary>/// <returns></returns>public static string Get_Disk_SN() => GetComputerHardWareInfo("Win32_LogicalDisk", "SerialNumber");
2.参考信息
2.1 操作系统信息
path: Win32_ComputerSystemProduct
key:
- Caption
- Description
- ElementName:
- IdentifyingNumber
- InstanceID:
- Name
- SKUNumber:
- UUID
- Vendor
- Version
- WarrantyDuration
- WarrantyStartDate
2.2 CPU
path: Win32_Processor
key:
- AddressWidth:在32位操作系统,该值是32,在64位操作系统是64
- Architecture:所使用的平台的处理器架构
- AssetTag:代表该处理器的资产标签
- Availability:设备的状态
- Caption:设备的简短描述
- Characteristics:处理器支持定义的功能
- ConfigManagerErrorCode:Windows API的配置管理器错误代码
- ConfigManagerUserConfig:如果为TRUE,该装置是使用用户定义的配置
- CpuStatus:处理器的当前状态
- CreationClassName:出现在用来创建一个实例继承链的第一个具体类的名称
- CurrentClockSpeed:处理器的当前速度,以MHz为单位
- CurrentVoltage:处理器的电压。如果第八位被设置,位0-6包含电压乘以10,如果第八位没有置位,则位在VoltageCaps设定表示的电压值。 CurrentVoltage时SMBIOS指定的电压值只设置
- DataWidth:在32位处理器,该值是32,在64位处理器是64
- Description:描述
- DeviceID:在系统上的处理器的唯一标识符
- ErrorCleared:如果为真,报上一个错误代码的被清除
- ErrorDescription:错误的代码描述
- ExtClock:外部时钟频率,以MHz为单位
- Family:处理器系列类型
- InstallDate:安装日期
- L2CacheSize:二级缓存大小
- L2CacheSpeed:二级缓存处理器的时钟速度
- L3CacheSize:三级缓存大小
- L3CacheSpeed:三级缓存处理器的时钟速度
- LastErrorCode:报告的逻辑设备上一个错误代码
- Level:处理器类型的定义。该值取决于处理器的体系结构
- LoadPercentage:每个处理器的负载能力,平均到最后一秒
- Manufacturer:处理器的制造商
- MaxClockSpeed:处理器的最大速度,以MHz为单位
- Name:处理器的名称
- NumberOfCores:处理器的当前实例的数目。核心是在集成电路上的物理处理器
- NumberOfEnabledCore:每个处理器插槽启用的内核数
- NumberOfLogicalProcessors:用于处理器的当前实例逻辑处理器的数量
- OtherFamilyDescription:处理器系列类型
- PartNumber:这款处理器的产品编号制造商所设置
- PNPDeviceID:即插即用逻辑设备的播放设备标识符
- PowerManagementCapabilities:逻辑设备的特定功率相关的能力阵列
- PowerManagementSupported:如果为TRUE,该装置的功率可以被管理,这意味着它可以被放入挂起模式
- ProcessorId:描述处理器功能的处理器的信息
- ProcessorType:处理器的主要功能
- Revision:系统修订级别取决于体系结构
- Role:所述处理器的作用
- SecondLevelAddressTranslationExtensions:如果为True,该处理器支持用于虚拟地址转换扩展
- SerialNumber:处理器的序列号
- SocketDesignation:芯片插座的线路上使用的类型
- Status:对象的当前状态
- StatusInfo:对象的当前状态信息
- Stepping:在处理器家族处理器的版本
- SystemCreationClassName:创建类名属性的作用域计算机的价值
- SystemName:系统的名称
- ThreadCount:每个处理器插槽的线程数
- UniqueId:全局唯一标识符的处理器
- UpgradeMethod:CPU插槽的信息
- Version:依赖于架构处理器的版本号
- VirtualizationFirmwareEnabled:如果真,固件可以虚拟化扩展
- VMMonitorModeExtensions:如果为True,该处理器支持Intel或AMD虚拟机监控器扩展。
- VoltageCaps:该处理器的电压的能力
2.3 主板
path:Win32_BaseBoard
key:
- Caption:简短说明
- ConfigOptions:数组,表示位于在底板上跳线和开关的配置
- CreationClassName:表示类的名称(就是Win32_baseboard类)
- Depth:对象的描述(底板)
- Description:基板
- Height:
- HostingBoard:如果为TRUE,该卡是一个主板,或在一个机箱中的基板。
- HotSwappable:如果为TRUE,就是支持热插拔(判断是否支持热插拔)
- InstallDate:
- Manufacturer:表示制造商的名称
- Model:
- Name:对象的名称标签
- OtherIdentifyingInfo:
- PartNumber:
- PoweredOn:如果为真,物理元素处于开机状态
- Product:产品的型号
- Removable:判断是否可拆卸的
- Replaceable:判断是否可更换的
- RequirementsDescription:
- RequiresDaughterBoard:
- SerialNumber:制造商分配的用于识别所述物理元件数目
- SKU:
- SlotLayout:
- SpecialRequirements:
- Status:对象的当前状态
- Tag:符系统的基板唯一标识
- Version:
- Weight:
- Width:
2.4 内存
path: Win32_PhysicalMemory
key:
- Attributes:
- BankLabel:
- Capacity:获取内存容量(单位KB)
- Caption:物理内存还虚拟内存
- ConfiguredClockSpeed:配置时钟速度
- ConfiguredVoltage:配置电压
- CreationClassName:创建类名
- DataWidth:获取内存带宽
- Description:描述
- DeviceLocator:获取设备定位器
- FormFactor:构成因素
- HotSwappable:是否支持热插拔
- InstallDate:安装日期
- InterleaveDataDepth:数据交错深度
- InterleavePosition:数据交错的位置
- Manufacturer:生产商
- MaxVoltage:最大电压
- MemoryType:内存类型
- MinVoltage:最小电压
- Model:型号
- Name:名字
- OtherIdentifyingInfo:其他识别信息
- PartNumber:零件编号
- PositionInRow:行位置
- PoweredOn:是否接通电源
- Removable:是否可拆卸
- Replaceable:是否可更换
- SerialNumber:编号
- SKU:SKU号
- SMBIOSMemoryType:SMBIOS内存类型
- Speed:速率
- Status:状态
- Tag:唯一标识符的物理存储器
- TotalWidth:总宽
- TypeDetail:类型详细信息
- Version:版本信息
- AvailableBytes:可利用内存大小(B)
- AvailableKBytes:可利用内存大小(KB)
- AvailableMBytes:可利用内存大小(MB)
- CacheBytes:
- CacheBytesPeak:
- CacheFaultsPersec:
- Caption:
- CommitLimit:
- CommittedBytes:
- DemandZeroFaultsPersec:
- Description:
- FreeAndZeroPageListBytes:
- FreeSystemPageTableEntries:
- Frequency_Object:
- Frequency_PerfTime:
- Frequency_Sys100NS:
- LongTermAverageStandbyCacheLifetimes:
- ModifiedPageListBytes:
- Name:
- PageFaultsPersec:
- PageReadsPersec:
- PagesInputPersec:
- PagesOutputPersec:
- PagesPersec:
- PageWritesPersec:
- PercentCommittedBytesInUse:
- PercentCommittedBytesInUse_Base:
- PoolNonpagedAllocs:
- PoolNonpagedBytes:
- PoolPagedAllocs:
- PoolPagedBytes:
- PoolPagedResidentBytes:
- StandbyCacheCoreBytes:
- StandbyCacheNormalPriorityBytes:
- StandbyCacheReserveBytes:
- SystemCacheResidentBytes:
- SystemCodeResidentBytes:
- SystemCodeTotalBytes:
- SystemDriverResidentBytes:
- SystemDriverTotalBytes:
- Timestamp_Object:
- Timestamp_PerfTime:
- Timestamp_Sys100NS:
- TransitionFaultsPersec:
- TransitionPagesRePurposedPersec:
- WriteCopiesPersec:
2.5 显卡
path: Win32_VideoController
key:
- AcceleratorCapabilities:
- AdapterCompatibility:
- AdapterDACType:
- AdapterRAM:
- Availability:
- CapabilityDescriptions:
- Caption:
- ColorTableEntries:
- ConfigManagerErrorCode:
- ConfigManagerUserConfig:False
- CreationClassName:
- CurrentBitsPerPixel:32
- CurrentHorizontalResolution:1920
- CurrentNumberOfColors:4294967296
- CurrentNumberOfColumns:0
- CurrentNumberOfRows:0
- CurrentRefreshRate:60
- CurrentScanMode:4
- CurrentVerticalResolution:1080
- Description:Intel(R) UHD Graphics
- DeviceID:VideoController1
- DeviceSpecificPens:
- DitherType:0
- DriverDate:20200109000000.000000-000
- DriverVersion:26.20.100.7755
- ErrorCleared:
- ErrorDescription:
- ICMIntent:
- ICMMethod:
- InfFilename:oem41.inf
- InfSection:iCML_w10_DS
- InstallDate:
- InstalledDisplayDrivers:
- LastErrorCode:
- MaxMemorySupported:
- MaxNumberControlled:
- MaxRefreshRate:75
- MinRefreshRate:50
- Monochrome:False
- Name:Intel(R) UHD Graphics
- NumberOfColorPlanes:
- NumberOfVideoPages:
- PNPDeviceID:
- PowerManagementCapabilities:
- PowerManagementSupported:
- ProtocolSupported:
- ReservedSystemPaletteEntries:
- SpecificationVersion:
- Status:OK
- StatusInfo:
- SystemCreationClassName:Win32_ComputerSystem
- SystemName:DESKTOP-OLA70V5
- SystemPaletteEntries:
- TimeOfLastReset:
- VideoArchitecture:5
- VideoMemoryType:2
- VideoMode:
- VideoModeDescription:屏幕描述
- VideoProcessor:Intel(R) UHD Graphics Family
- AcceleratorCapabilities:
- AdapterCompatibility:NVIDIA
- AdapterDACType:Integrated RAMDAC
- AdapterRAM:4293918720
- Availability:8
- CapabilityDescriptions:
- Caption:显卡描述
- ColorTableEntries:
- ConfigManagerErrorCode:0
- ConfigManagerUserConfig:False
- CreationClassName:Win32_VideoController
- CurrentBitsPerPixel:
- CurrentHorizontalResolution:
- CurrentNumberOfColors:
- CurrentNumberOfColumns:
- CurrentNumberOfRows:
- CurrentRefreshRate:
- CurrentScanMode:
- CurrentVerticalResolution:
- Description:NVIDIA GeForce MX330
- DeviceID:VideoController2
- DeviceSpecificPens:
- DitherType:
- DriverDate:20200923000000.000000-000
- DriverVersion:27.21.14.5241
- ErrorCleared:
- ErrorDescription:
- ICMIntent:
- ICMMethod:
- InfFilename:oem123.inf
- InfSection:Section043
- InstallDate:
- InstalledDisplayDrivers:
- MaxMemorySupported:
- MaxNumberControlled:
- MaxRefreshRate:
- MinRefreshRate:
- Monochrome:False
- Name:NVIDIA GeForce MX330
- NumberOfColorPlanes:
- NumberOfVideoPages:
- PNPDeviceID:
- PowerManagementCapabilities:
- PowerManagementSupported:
- ProtocolSupported:
- ReservedSystemPaletteEntries:
- SpecificationVersion:
- Status:OK
- StatusInfo:
- SystemCreationClassName:Win32_ComputerSystem
- SystemName:DESKTOP-OLA70V5
- SystemPaletteEntries:
- TimeOfLastReset:
- VideoArchitecture:5
- VideoMemoryType:2
- VideoMode:
- VideoModeDescription:
- VideoProcessor:
2.6 硬盘
path: Win32_LogicalDisk
key:
- Access:0
- Availability:
- BlockSize:
- Caption:硬盘描述,例如“C:”
- Compressed:False
- ConfigManagerErrorCode:Windows配置管理器错误代码
- ConfigManagerUserConfig:如果为True,该设备使用用户定义的配置
- CreationClassName:Win32_LogicalDisk
- Description:本地固定磁盘
- DeviceID:磁盘驱动器与系统中的其他设备的唯一标识符,例如“C:”
- DriveType:3
- ErrorCleared:如果为True,报告LastErrorCode错误现已清除
- ErrorDescription:关于可能采取的纠正措施记录在LastErrorCode错误,和信息的详细信息
- ErrorMethodology:误差检测和校正的类型被此设备支持
- FileSystem:NTFS
- FreeSpace:可使用硬盘大小
- InstallDate:
- LastErrorCode:
- MaximumComponentLength:255
- MediaType:由该设备使用或访问的媒体类型
- Name:硬盘名字
- NumberOfBlocks:
- PNPDeviceID:即插即用逻辑设备的播放设备标识符
- PowerManagementCapabilities:
- PowerManagementSupported:
- ProviderName:
- Purpose:
- QuotasDisabled:True
- QuotasIncomplete:False
- QuotasRebuilding:False
- Size:硬盘总大小
- Status:对象的当前状态
- StatusInfo:逻辑设备的状态
- SupportsDiskQuotas:True
- SupportsFileBasedCompression:True
- SystemCreationClassName:Win32_ComputerSystem
- SystemName:DESKTOP-OLA70V5
- VolumeDirty:False
- VolumeName:Windows
- VolumeSerialNumber:硬盘的序列号
2.7 网卡
path: Win32_NetworkAdapterConfiguration
key:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000000] Microsoft Kernel Debug Network Adapter
DatabasePath:
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:Microsoft Kernel Debug Network Adapter
DHCPEnabled:True
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:
DNSEnabledForWINSResolution:
DNSHostName:
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:
ForwardBufferMemory:
FullDNSRegistrationEnabled:
GatewayCostMetric:
IGMPLevel:
Index:0
InterfaceIndex:12
IPAddress:
IPConnectionMetric:
IPEnabled:False
IPFilterSecurityEnabled:
IPPortSecurityEnabled:
IPSecPermitIPProtocols:
IPSecPermitTCPPorts:
IPSecPermitUDPPorts:
IPSubnet:
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:kdnic
SettingID:{B218DEDB-FF73-45A8-B266-5D7106DA7C70}
TcpipNetbiosOptions:
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:
WINSEnableLMHostsLookup:
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000001] Intel(R) 82574L Gigabit Network Connection
DatabasePath:%SystemRoot%\System32\drivers\etc
DeadGWDetectEnabled:
DefaultIPGateway:System.String[]
DefaultTOS:
DefaultTTL:
Description:Intel(R) 82574L Gigabit Network Connection
DHCPEnabled:False
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:System.String[]
DNSEnabledForWINSResolution:False
DNSHostName:WIN10-DEVE-109
DNSServerSearchOrder:System.String[]
DomainDNSRegistrationEnabled:False
ForwardBufferMemory:
FullDNSRegistrationEnabled:True
GatewayCostMetric:System.UInt16[]
IGMPLevel:
Index:1
InterfaceIndex:10
IPAddress:System.String[]
IPConnectionMetric:25
IPEnabled:True
IPFilterSecurityEnabled:False
IPPortSecurityEnabled:
IPSecPermitIPProtocols:System.String[]
IPSecPermitTCPPorts:System.String[]
IPSecPermitUDPPorts:System.String[]
IPSubnet:System.String[]
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:00:50:56:89:0D:D8
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:e1iexpress
SettingID:{9412E669-5772-4E77-8E32-8D98686A8D52}
TcpipNetbiosOptions:0
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:64512
WINSEnableLMHostsLookup:True
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000002] WAN Miniport (SSTP)
DatabasePath:
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:WAN Miniport (SSTP)
DHCPEnabled:False
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:
DNSEnabledForWINSResolution:
DNSHostName:
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:
ForwardBufferMemory:
FullDNSRegistrationEnabled:
GatewayCostMetric:
IGMPLevel:
Index:2
InterfaceIndex:2
IPAddress:
IPConnectionMetric:
IPEnabled:False
IPFilterSecurityEnabled:
IPPortSecurityEnabled:
IPSecPermitIPProtocols:
IPSecPermitTCPPorts:
IPSecPermitUDPPorts:
IPSubnet:
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:RasSstp
SettingID:{0538BAF3-3380-4B19-8F44-10E81B2408CB}
TcpipNetbiosOptions:
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:
WINSEnableLMHostsLookup:
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000003] WAN Miniport (IKEv2)
DatabasePath:
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:WAN Miniport (IKEv2)
DHCPEnabled:False
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:
DNSEnabledForWINSResolution:
DNSHostName:
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:
ForwardBufferMemory:
FullDNSRegistrationEnabled:
GatewayCostMetric:
IGMPLevel:
Index:3
InterfaceIndex:4
IPAddress:
IPConnectionMetric:
IPEnabled:False
IPFilterSecurityEnabled:
IPPortSecurityEnabled:
IPSecPermitIPProtocols:
IPSecPermitTCPPorts:
IPSecPermitUDPPorts:
IPSubnet:
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:RasAgileVpn
SettingID:{0A166E1B-CE62-41F2-A2BC-AEA10D1FCAE3}
TcpipNetbiosOptions:
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:
WINSEnableLMHostsLookup:
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000004] WAN Miniport (L2TP)
DatabasePath:
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:WAN Miniport (L2TP)
DHCPEnabled:False
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:
DNSEnabledForWINSResolution:
DNSHostName:
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:
ForwardBufferMemory:
FullDNSRegistrationEnabled:
GatewayCostMetric:
IGMPLevel:
Index:4
InterfaceIndex:17
IPAddress:
IPConnectionMetric:
IPEnabled:False
IPFilterSecurityEnabled:
IPPortSecurityEnabled:
IPSecPermitIPProtocols:
IPSecPermitTCPPorts:
IPSecPermitUDPPorts:
IPSubnet:
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:Rasl2tp
SettingID:{F82E95C6-BB99-42EF-9D60-6B0E83963CB4}
TcpipNetbiosOptions:
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:
WINSEnableLMHostsLookup:
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000005] WAN Miniport (PPTP)
DatabasePath:
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:WAN Miniport (PPTP)
DHCPEnabled:False
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:
DNSEnabledForWINSResolution:
DNSHostName:
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:
ForwardBufferMemory:
FullDNSRegistrationEnabled:
GatewayCostMetric:
IGMPLevel:
Index:5
InterfaceIndex:11
IPAddress:
IPConnectionMetric:
IPEnabled:False
IPFilterSecurityEnabled:
IPPortSecurityEnabled:
IPSecPermitIPProtocols:
IPSecPermitTCPPorts:
IPSecPermitUDPPorts:
IPSubnet:
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:PptpMiniport
SettingID:{A1BBFB3C-0BB5-4EAC-9171-DAA2274F1718}
TcpipNetbiosOptions:
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:
WINSEnableLMHostsLookup:
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000006] WAN Miniport (PPPOE)
DatabasePath:
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:WAN Miniport (PPPOE)
DHCPEnabled:False
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:
DNSEnabledForWINSResolution:
DNSHostName:
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:
ForwardBufferMemory:
FullDNSRegistrationEnabled:
GatewayCostMetric:
IGMPLevel:
Index:6
InterfaceIndex:13
IPAddress:
IPConnectionMetric:
IPEnabled:False
IPFilterSecurityEnabled:
IPPortSecurityEnabled:
IPSecPermitIPProtocols:
IPSecPermitTCPPorts:
IPSecPermitUDPPorts:
IPSubnet:
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:RasPppoe
SettingID:{C0FAB81D-0C4B-4829-9B34-7FB635FD8C94}
TcpipNetbiosOptions:
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:
WINSEnableLMHostsLookup:
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000007] WAN Miniport (IP)
DatabasePath:
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:WAN Miniport (IP)
DHCPEnabled:False
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:
DNSEnabledForWINSResolution:
DNSHostName:
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:
ForwardBufferMemory:
FullDNSRegistrationEnabled:
GatewayCostMetric:
IGMPLevel:
Index:7
InterfaceIndex:8
IPAddress:
IPConnectionMetric:
IPEnabled:False
IPFilterSecurityEnabled:
IPPortSecurityEnabled:
IPSecPermitIPProtocols:
IPSecPermitTCPPorts:
IPSecPermitUDPPorts:
IPSubnet:
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:32:19:20:52:41:53
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:NdisWan
SettingID:{7F05F3BA-FBE5-483D-9004-C5909CCCDE09}
TcpipNetbiosOptions:
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:
WINSEnableLMHostsLookup:
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000008] WAN Miniport (IPv6)
DatabasePath:
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:WAN Miniport (IPv6)
DHCPEnabled:False
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:
DNSEnabledForWINSResolution:
DNSHostName:
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:
ForwardBufferMemory:
FullDNSRegistrationEnabled:
GatewayCostMetric:
IGMPLevel:
Index:8
InterfaceIndex:15
IPAddress:
IPConnectionMetric:
IPEnabled:False
IPFilterSecurityEnabled:
IPPortSecurityEnabled:
IPSecPermitIPProtocols:
IPSecPermitTCPPorts:
IPSecPermitUDPPorts:
IPSubnet:
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:38:40:20:52:41:53
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:NdisWan
SettingID:{E22E365A-BAED-4D2C-8C46-6AA4A2A4F1FF}
TcpipNetbiosOptions:
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:
WINSEnableLMHostsLookup:
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000009] WAN Miniport (Network Monitor)
DatabasePath:
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:WAN Miniport (Network Monitor)
DHCPEnabled:False
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:
DNSEnabledForWINSResolution:
DNSHostName:
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:
ForwardBufferMemory:
FullDNSRegistrationEnabled:
GatewayCostMetric:
IGMPLevel:
Index:9
InterfaceIndex:16
IPAddress:
IPConnectionMetric:
IPEnabled:False
IPFilterSecurityEnabled:
IPPortSecurityEnabled:
IPSecPermitIPProtocols:
IPSecPermitTCPPorts:
IPSecPermitUDPPorts:
IPSubnet:
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:40:74:20:52:41:53
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:NdisWan
SettingID:{E98A6A49-B7DD-4EF7-8A1D-A7285CEDCFA2}
TcpipNetbiosOptions:
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:
WINSEnableLMHostsLookup:
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000010] VMware Virtual Ethernet Adapter for VMnet1
DatabasePath:%SystemRoot%\System32\drivers\etc
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:VMware Virtual Ethernet Adapter for VMnet1
DHCPEnabled:True
DHCPLeaseExpires:20240131172404.000000+480
DHCPLeaseObtained:20240131165404.000000+480
DHCPServer:192.168.6.254
DNSDomain:
DNSDomainSuffixSearchOrder:System.String[]
DNSEnabledForWINSResolution:False
DNSHostName:WIN10-DEVE-109
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:False
ForwardBufferMemory:
FullDNSRegistrationEnabled:True
GatewayCostMetric:
IGMPLevel:
Index:10
InterfaceIndex:14
IPAddress:System.String[]
IPConnectionMetric:35
IPEnabled:True
IPFilterSecurityEnabled:False
IPPortSecurityEnabled:
IPSecPermitIPProtocols:System.String[]
IPSecPermitTCPPorts:System.String[]
IPSecPermitUDPPorts:System.String[]
IPSubnet:System.String[]
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:00:50:56:C0:00:01
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:VMnetAdapter
SettingID:{C5525D50-5058-4362-B3B7-EA8C848E37A9}
TcpipNetbiosOptions:0
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:64512
WINSEnableLMHostsLookup:True
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000011] VMware Virtual Ethernet Adapter for VMnet8
DatabasePath:%SystemRoot%\System32\drivers\etc
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:VMware Virtual Ethernet Adapter for VMnet8
DHCPEnabled:True
DHCPLeaseExpires:20240131172404.000000+480
DHCPLeaseObtained:20240131165404.000000+480
DHCPServer:192.168.111.254
DNSDomain:
DNSDomainSuffixSearchOrder:System.String[]
DNSEnabledForWINSResolution:False
DNSHostName:WIN10-DEVE-109
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:False
ForwardBufferMemory:
FullDNSRegistrationEnabled:True
GatewayCostMetric:
IGMPLevel:
Index:11
InterfaceIndex:7
IPAddress:System.String[]
IPConnectionMetric:35
IPEnabled:True
IPFilterSecurityEnabled:False
IPPortSecurityEnabled:
IPSecPermitIPProtocols:System.String[]
IPSecPermitTCPPorts:System.String[]
IPSecPermitUDPPorts:System.String[]
IPSubnet:System.String[]
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:00:50:56:C0:00:08
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:VMnetAdapter
SettingID:{7C8E3C5A-515F-4EE0-B37C-CD4A107C42FD}
TcpipNetbiosOptions:0
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:64512
WINSEnableLMHostsLookup:True
WINSHostLookupFile:
WINSPrimaryServer:192.168.111.2
WINSScopeID:
WINSSecondaryServer:
ArpAlwaysSourceRoute:
ArpUseEtherSNAP:
Caption:[00000012] Microsoft KM-TEST 环回适配器
DatabasePath:%SystemRoot%\System32\drivers\etc
DeadGWDetectEnabled:
DefaultIPGateway:
DefaultTOS:
DefaultTTL:
Description:Microsoft KM-TEST 环回适配器
DHCPEnabled:False
DHCPLeaseExpires:
DHCPLeaseObtained:
DHCPServer:
DNSDomain:
DNSDomainSuffixSearchOrder:System.String[]
DNSEnabledForWINSResolution:False
DNSHostName:WIN10-DEVE-109
DNSServerSearchOrder:
DomainDNSRegistrationEnabled:False
ForwardBufferMemory:
FullDNSRegistrationEnabled:True
GatewayCostMetric:
IGMPLevel:
Index:12
InterfaceIndex:6
IPAddress:System.String[]
IPConnectionMetric:25
IPEnabled:True
IPFilterSecurityEnabled:False
IPPortSecurityEnabled:
IPSecPermitIPProtocols:System.String[]
IPSecPermitTCPPorts:System.String[]
IPSecPermitUDPPorts:System.String[]
IPSubnet:System.String[]
IPUseZeroBroadcast:
IPXAddress:
IPXEnabled:
IPXFrameType:
IPXMediaType:
IPXNetworkNumber:
IPXVirtualNetNumber:
KeepAliveInterval:
KeepAliveTime:
MACAddress:02:00:4C:4F:4F:50
MTU:
NumForwardPackets:
PMTUBHDetectEnabled:
PMTUDiscoveryEnabled:
ServiceName:kmloop
SettingID:{70CFC505-B5F4-4C3F-8E92-E03AD40316AD}
TcpipNetbiosOptions:0
TcpMaxConnectRetransmissions:
TcpMaxDataRetransmissions:
TcpNumConnections:
TcpUseRFC1122UrgentPointer:
TcpWindowSize:64512
WINSEnableLMHostsLookup:True
WINSHostLookupFile:
WINSPrimaryServer:
WINSScopeID:
WINSSecondaryServer:
参考文章:https://www.cnblogs.com/dongweian/p/14182576.html
这篇关于C# 获取计算机信息(操作系统/硬件)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!