powershell - Get processor info with wmic - format error -


when try number of cores , logical processors in 1 shot, following error:

 ps c:\> wmic cpu numberofcores, numberoflogicalprocessors /format:list invalid expression. 

how can format correctly result want?

put list of field names in quotes , remove space between them:

wmic cpu "numberofcores,numberoflogicalprocessors" /format:list 

better yet, drop wmic , use get-wmiobject if you're using powershell anyway:

get-wmiobject win32_processor |     select-object numberofcores, numberoflogicalprocessors |     format-list 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -