将 linux 命令转换为 Cim windows 命令
Convert the linux command to Cim windows command
使用 Cim 实例的等效命令是什么?
wmic cpu list /format:list
使用 Powershell ,您可以这样使用:
Get-CimInstance Win32_Processor
如果你想获取关于CPU的所有信息,你可以使用这个命令:
Get-CimInstance Win32_Processor | Select *
如果您想获取并选择特定的 属性,只需键入此命令即可将您想要的 select 视为 属性 :
Get-CimInstance Win32_Processor | Get-Member
Name MemberType Definition
---- ---------- ----------
Clone Method System.Object ICloneable.Clone()
Dispose Method void Dispose(), void IDisposable.Dispose()
Equals Method bool Equals(System.Object obj)
GetCimSessionComputerName Method string GetCimSessionComputerName()
GetCimSessionInstanceId Method guid GetCimSessionInstanceId()
GetHashCode Method int GetHashCode()
GetObjectData Method void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)...
GetType Method type GetType()
ToString Method string ToString()
AddressWidth Property uint16 AddressWidth {get;}
Architecture Property uint16 Architecture {get;}
AssetTag Property string AssetTag {get;}
Availability Property uint16 Availability {get;}
Caption Property string Caption {get;}
Characteristics Property uint32 Characteristics {get;}
ConfigManagerErrorCode Property uint32 ConfigManagerErrorCode {get;}
ConfigManagerUserConfig Property bool ConfigManagerUserConfig {get;}
CpuStatus Property uint16 CpuStatus {get;}
CreationClassName Property string CreationClassName {get;}
CurrentClockSpeed Property uint32 CurrentClockSpeed {get;}
CurrentVoltage Property uint16 CurrentVoltage {get;}
DataWidth Property uint16 DataWidth {get;}
Description Property string Description {get;}
DeviceID Property string DeviceID {get;}
ErrorCleared Property bool ErrorCleared {get;}
ErrorDescription Property string ErrorDescription {get;}
ExtClock Property uint32 ExtClock {get;}
Family Property uint16 Family {get;}
InstallDate Property CimInstance#DateTime InstallDate {get;}
L2CacheSize Property uint32 L2CacheSize {get;}
L2CacheSpeed Property uint32 L2CacheSpeed {get;}
L3CacheSize Property uint32 L3CacheSize {get;}
L3CacheSpeed Property uint32 L3CacheSpeed {get;}
LastErrorCode Property uint32 LastErrorCode {get;}
Level Property uint16 Level {get;}
LoadPercentage Property uint16 LoadPercentage {get;}
Manufacturer Property string Manufacturer {get;}
MaxClockSpeed Property uint32 MaxClockSpeed {get;}
Name Property string Name {get;}
NumberOfCores Property uint32 NumberOfCores {get;}
NumberOfEnabledCore Property uint32 NumberOfEnabledCore {get;}
NumberOfLogicalProcessors Property uint32 NumberOfLogicalProcessors {get;}
OtherFamilyDescription Property string OtherFamilyDescription {get;}
PartNumber Property string PartNumber {get;}
PNPDeviceID Property string PNPDeviceID {get;}
PowerManagementCapabilities Property uint16[] PowerManagementCapabilities {get;}
PowerManagementSupported Property bool PowerManagementSupported {get;}
ProcessorId Property string ProcessorId {get;}
ProcessorType Property uint16 ProcessorType {get;}
PSComputerName Property string PSComputerName {get;}
Revision Property uint16 Revision {get;}
Role Property string Role {get;}
SecondLevelAddressTranslationExtensions Property bool SecondLevelAddressTranslationExtensions {get;}
SerialNumber Property string SerialNumber {get;}
SocketDesignation Property string SocketDesignation {get;}
Status Property string Status {get;}
StatusInfo Property uint16 StatusInfo {get;}
Stepping Property string Stepping {get;}
SystemCreationClassName Property string SystemCreationClassName {get;}
SystemName Property string SystemName {get;}
ThreadCount Property uint32 ThreadCount {get;}
UniqueId Property string UniqueId {get;}
UpgradeMethod Property uint16 UpgradeMethod {get;}
Version Property string Version {get;}
VirtualizationFirmwareEnabled Property bool VirtualizationFirmwareEnabled {get;}
VMMonitorModeExtensions Property bool VMMonitorModeExtensions {get;}
VoltageCaps Property uint32 VoltageCaps {get;}
PSConfiguration PropertySet PSConfiguration {AddressWidth, DataWidth, DeviceID, ExtClock, L2CacheSize, L2CacheSpeed, MaxClockSpeed, PowerManagementSupport...
PSStatus PropertySet PSStatus {Availability, CpuStatus, CurrentVoltage, DeviceID, ErrorCleared, ErrorDescription, LastErrorCode, LoadPercentage,...
例如,您想要 select 其中一些 :
Get-CimInstance Win32_Processor |
Select Caption,Manufacturer,Name,NumberOfLogicalProcessors,NumberOfCores,NumberOfEnabledCore,ProcessorType,DeviceID,AddressWidth,Architecture,CpuStatus,CurrentClockSpeed,CurrentVoltage,LoadPercentage,MaxClockSpeed
使用 Cim 实例的等效命令是什么?
wmic cpu list /format:list
使用 Powershell ,您可以这样使用:
Get-CimInstance Win32_Processor
如果你想获取关于CPU的所有信息,你可以使用这个命令:
Get-CimInstance Win32_Processor | Select *
如果您想获取并选择特定的 属性,只需键入此命令即可将您想要的 select 视为 属性 :
Get-CimInstance Win32_Processor | Get-Member
Name MemberType Definition
---- ---------- ----------
Clone Method System.Object ICloneable.Clone()
Dispose Method void Dispose(), void IDisposable.Dispose()
Equals Method bool Equals(System.Object obj)
GetCimSessionComputerName Method string GetCimSessionComputerName()
GetCimSessionInstanceId Method guid GetCimSessionInstanceId()
GetHashCode Method int GetHashCode()
GetObjectData Method void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)...
GetType Method type GetType()
ToString Method string ToString()
AddressWidth Property uint16 AddressWidth {get;}
Architecture Property uint16 Architecture {get;}
AssetTag Property string AssetTag {get;}
Availability Property uint16 Availability {get;}
Caption Property string Caption {get;}
Characteristics Property uint32 Characteristics {get;}
ConfigManagerErrorCode Property uint32 ConfigManagerErrorCode {get;}
ConfigManagerUserConfig Property bool ConfigManagerUserConfig {get;}
CpuStatus Property uint16 CpuStatus {get;}
CreationClassName Property string CreationClassName {get;}
CurrentClockSpeed Property uint32 CurrentClockSpeed {get;}
CurrentVoltage Property uint16 CurrentVoltage {get;}
DataWidth Property uint16 DataWidth {get;}
Description Property string Description {get;}
DeviceID Property string DeviceID {get;}
ErrorCleared Property bool ErrorCleared {get;}
ErrorDescription Property string ErrorDescription {get;}
ExtClock Property uint32 ExtClock {get;}
Family Property uint16 Family {get;}
InstallDate Property CimInstance#DateTime InstallDate {get;}
L2CacheSize Property uint32 L2CacheSize {get;}
L2CacheSpeed Property uint32 L2CacheSpeed {get;}
L3CacheSize Property uint32 L3CacheSize {get;}
L3CacheSpeed Property uint32 L3CacheSpeed {get;}
LastErrorCode Property uint32 LastErrorCode {get;}
Level Property uint16 Level {get;}
LoadPercentage Property uint16 LoadPercentage {get;}
Manufacturer Property string Manufacturer {get;}
MaxClockSpeed Property uint32 MaxClockSpeed {get;}
Name Property string Name {get;}
NumberOfCores Property uint32 NumberOfCores {get;}
NumberOfEnabledCore Property uint32 NumberOfEnabledCore {get;}
NumberOfLogicalProcessors Property uint32 NumberOfLogicalProcessors {get;}
OtherFamilyDescription Property string OtherFamilyDescription {get;}
PartNumber Property string PartNumber {get;}
PNPDeviceID Property string PNPDeviceID {get;}
PowerManagementCapabilities Property uint16[] PowerManagementCapabilities {get;}
PowerManagementSupported Property bool PowerManagementSupported {get;}
ProcessorId Property string ProcessorId {get;}
ProcessorType Property uint16 ProcessorType {get;}
PSComputerName Property string PSComputerName {get;}
Revision Property uint16 Revision {get;}
Role Property string Role {get;}
SecondLevelAddressTranslationExtensions Property bool SecondLevelAddressTranslationExtensions {get;}
SerialNumber Property string SerialNumber {get;}
SocketDesignation Property string SocketDesignation {get;}
Status Property string Status {get;}
StatusInfo Property uint16 StatusInfo {get;}
Stepping Property string Stepping {get;}
SystemCreationClassName Property string SystemCreationClassName {get;}
SystemName Property string SystemName {get;}
ThreadCount Property uint32 ThreadCount {get;}
UniqueId Property string UniqueId {get;}
UpgradeMethod Property uint16 UpgradeMethod {get;}
Version Property string Version {get;}
VirtualizationFirmwareEnabled Property bool VirtualizationFirmwareEnabled {get;}
VMMonitorModeExtensions Property bool VMMonitorModeExtensions {get;}
VoltageCaps Property uint32 VoltageCaps {get;}
PSConfiguration PropertySet PSConfiguration {AddressWidth, DataWidth, DeviceID, ExtClock, L2CacheSize, L2CacheSpeed, MaxClockSpeed, PowerManagementSupport...
PSStatus PropertySet PSStatus {Availability, CpuStatus, CurrentVoltage, DeviceID, ErrorCleared, ErrorDescription, LastErrorCode, LoadPercentage,...
例如,您想要 select 其中一些 :
Get-CimInstance Win32_Processor |
Select Caption,Manufacturer,Name,NumberOfLogicalProcessors,NumberOfCores,NumberOfEnabledCore,ProcessorType,DeviceID,AddressWidth,Architecture,CpuStatus,CurrentClockSpeed,CurrentVoltage,LoadPercentage,MaxClockSpeed