Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function Get-CpuFamily {
<#
.SYNOPSIS
Convert CPU family code to string representation.
.NOTES
Author: Øyvind Kallstad
Date: 09.12.2014
Version: 1.0
#>
[CmdletBinding()]
param (
[Parameter(Position = 0, ValueFromPipeline)]
[ValidateRange(0,[int]::MaxValue)]
[int] $Key
)
# get processor family (https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=HTMLDocuments%2FWS-Management_Class_Reference%2FCIM_Processor.htm)
switch -Exact ($Key) {
1 {$processorFamily = 'Other'}
2 {$processorFamily = 'Unknown'}
3 {$processorFamily = '8086'}
4 {$processorFamily = '80286'}
5 {$processorFamily = '80386'}
6 {$processorFamily = '80486'}
7 {$processorFamily = '8087'}
8 {$processorFamily = '80287'}
9 {$processorFamily = '80387'}
10 {$processorFamily = '80487'}
11 {$processorFamily = 'Pentium(R) brand'}
12 {$processorFamily = 'Pentium(R) Pro'}
13 {$processorFamily = 'Pentium(R) II'}
14 {$processorFamily = 'Pentium(R) processor with MMX(TM) technology'}
15 {$processorFamily = 'Celeron(TM)'}
16 {$processorFamily = 'Pentium(R) II Xeon(TM)'}
17 {$processorFamily = 'Pentium(R) III'}
18 {$processorFamily = 'M1 Family'}
19 {$processorFamily = 'M2 Family'}
20 {$processorFamily = 'Intel(R) Celeron(R) M processor'}
21 {$processorFamily = 'Intel(R) Pentium(R) 4 HT processor'}
{22..23 -contains $_} {$processorFamily = 'Reserved'}
24 {$processorFamily = 'K5 Family'}
25 {$processorFamily = 'K6 Family'}
26 {$processorFamily = 'K6-2'}
27 {$processorFamily = 'K6-3'}
28 {$processorFamily = 'AMD Athlon(TM) Processor Family'}
29 {$processorFamily = 'AMD(R) Duron(TM) Processor'}
30 {$processorFamily = 'AMD29000 Family'}
31 {$processorFamily = 'K6-2+'}
32 {$processorFamily = 'Power PC Family'}
33 {$processorFamily = 'Power PC 601'}
34 {$processorFamily = 'Power PC 603'}
35 {$processorFamily = 'Power PC 603+'}
36 {$processorFamily = 'Power PC 604'}
37 {$processorFamily = 'Power PC 620'}
38 {$processorFamily = 'Power PC X704'}
39 {$processorFamily = 'Power PC 750'}
40 {$processorFamily = 'Intel(R) Core(TM) Duo processor'}
41 {$processorFamily = 'Intel(R) Core(TM) Duo mobile processor'}
42 {$processorFamily = 'Intel(R) Core(TM) Solo mobile processor'}
43 {$processorFamily = 'Intel(R) Atom(TM) processor'}
{44..47 -contains $_} {$processorFamily = 'Reserved'}
48 {$processorFamily = 'Alpha Family'}
49 {$processorFamily = 'Alpha 21064'}
50 {$processorFamily = 'Alpha 21066'}
51 {$processorFamily = 'Alpha 21164'}
52 {$processorFamily = 'Alpha 21164PC'}
53 {$processorFamily = 'Alpha 21164a'}
54 {$processorFamily = 'Alpha 21264'}
55 {$processorFamily = 'Alpha 21364'}
56 {$processorFamily = 'AMD Turion(TM) II Ultra Dual-Core Mobile M Processor Family'}
57 {$processorFamily = 'AMD Turion(TM) II Dual-Core Mobile M Processor Family'}
58 {$processorFamily = 'AMD Athlon(TM) II Dual-Core Mobile M Processor Family'}
59 {$processorFamily = 'AMD Opteron(TM) 6100 Series Processor'}
60 {$processorFamily = 'AMD Opteron(TM) 4100 Series Processor'}
61 {$processorFamily = 'AMD Opteron(TM) 6200 Series Processor'}
62 {$processorFamily = 'AMD Opteron(TM) 4200 Series Processor'}
63 {$processorFamily = 'AMD FX(TM) Series Processor'}
64 {$processorFamily = 'MIPS Family'}
65 {$processorFamily = 'MIPS R4000'}
66 {$processorFamily = 'MIPS R4200'}
67 {$processorFamily = 'MIPS R4400'}
68 {$processorFamily = 'MIPS R4600'}
69 {$processorFamily = 'MIPS R10000'}
70 {$processorFamily = 'AMD C-Series Processor'}
71 {$processorFamily = 'AMD E-Series Processor'}
72 {$processorFamily = 'AMD A-Series Processor'}
73 {$processorFamily = 'AMD G-Series Processor'}
74 {$processorFamily = 'AMD Z-Series Processor'}
{75..79 -contains $_} {$processorFamily = 'Reserved'}
80 {$processorFamily = 'SPARC Family'}
81 {$processorFamily = 'SuperSPARC'}
82 {$processorFamily = 'microSPARC II'}
83 {$processorFamily = 'microSPARC IIep'}
84 {$processorFamily = 'UltraSPARC'}
85 {$processorFamily = 'UltraSPARC II'}
86 {$processorFamily = 'UltraSPARC IIi'}
87 {$processorFamily = 'UltraSPARC III'}
88 {$processorFamily = 'UltraSPARC IIIi'}
{89..95 -contains $_} {$processorFamily = 'Reserved'}
96 {$processorFamily = '68040'}
97 {$processorFamily = '68xxx Family'}
98 {$processorFamily = '68000'}
99 {$processorFamily = '68010'}
100 {$processorFamily = '68020'}
101 {$processorFamily = '68030'}
{102..111 -contains $_} {$processorFamily = 'Reserved'}
112 {$processorFamily = 'Hobbit Family'}
{113..119 -contains $_} {$processorFamily = 'Reserved'}
120 {$processorFamily = 'Crusoe(TM) TM5000 Family'}
121 {$processorFamily = 'Crusoe(TM) TM3000 Family'}
122 {$processorFamily = 'Efficeon(TM) TM8000 Family'}
{123..127 -contains $_} {$processorFamily = 'Reserved'}
128 {$processorFamily = 'Weitek'}
129 {$processorFamily = 'Reserved'}
130 {$processorFamily = 'Itanium(TM) Processor'}
131 {$processorFamily = 'AMD Athlon(TM) 64 Processor Family'}
132 {$processorFamily = 'AMD Opteron(TM) Processor Family'}
133 {$processorFamily = 'AMD Sempron(TM) Processor Family'}
134 {$processorFamily = 'AMD Turion(TM) 64 Mobile Technology'}
135 {$processorFamily = 'Dual-Core AMD Opteron(TM) Processor Family'}
136 {$processorFamily = 'AMD Athlon(TM) 64 X2 Dual-Core Processor Family'}
137 {$processorFamily = 'AMD Turion(TM) 64 X2 Mobile Technology'}
138 {$processorFamily = 'Quad-Core AMD Opteron(TM) Processor Family'}
139 {$processorFamily = 'Third-Generation AMD Opteron(TM) Processor Family'}
140 {$processorFamily = 'AMD Phenom(TM) FX Quad-Core Processor Family'}
141 {$processorFamily = 'AMD Phenom(TM) X4 Quad-Core Processor Family'}
142 {$processorFamily = 'AMD Phenom(TM) X2 Dual-Core Processor Family'}
143 {$processorFamily = 'AMD Athlon(TM) X2 Dual-Core Processor Family'}
144 {$processorFamily = 'PA-RISC Family'}
145 {$processorFamily = 'PA-RISC 8500'}
146 {$processorFamily = 'PA-RISC 8000'}
147 {$processorFamily = 'PA-RISC 7300LC'}
148 {$processorFamily = 'PA-RISC 7200'}
149 {$processorFamily = 'PA-RISC 7100LC'}
150 {$processorFamily = 'PA-RISC 7100'}
{151..159 -contains $_} {$processorFamily = 'Reserved'}
160 {$processorFamily = 'V30 Family'}
161 {$processorFamily = 'Quad-Core Intel(R) Xeon(R) processor 3200 Series'}
162 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor 3000 Series'}
163 {$processorFamily = 'Quad-Core Intel(R) Xeon(R) processor 5300 Series'}
164 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor 5100 Series'}
165 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor 5000 Series'}
166 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor LV'}
167 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor ULV'}
168 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor 7100 Series'}
169 {$processorFamily = 'Quad-Core Intel(R) Xeon(R) processor 5400 Series'}
170 {$processorFamily = 'Quad-Core Intel(R) Xeon(R) processor'}
171 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor 5200 Series'}
172 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor 7200 Series'}
173 {$processorFamily = 'Quad-Core Intel(R) Xeon(R) processor 7300 Series'}
174 {$processorFamily = 'Quad-Core Intel(R) Xeon(R) processor 7400 Series'}
175 {$processorFamily = 'Multi-Core Intel(R) Xeon(R) processor 7400 Series'}
176 {$processorFamily = 'Pentium(R) III Xeon(TM)'}
177 {$processorFamily = 'Pentium(R) III Processor with Intel(R) SpeedStep(TM) Technology'}
178 {$processorFamily = 'Pentium(R) 4'}
179 {$processorFamily = 'Intel(R) Xeon(TM)'}
180 {$processorFamily = 'AS400 Family'}
181 {$processorFamily = 'Intel(R) Xeon(TM) processor MP'}
182 {$processorFamily = 'AMD Athlon(TM) XP Family'}
183 {$processorFamily = 'AMD Athlon(TM) MP Family'}
184 {$processorFamily = 'Intel(R) Itanium(R) 2'}
185 {$processorFamily = 'Intel(R) Pentium(R) M processor'}
186 {$processorFamily = 'Intel(R) Celeron(R) D processor'}
187 {$processorFamily = 'Intel(R) Pentium(R) D processor'}
188 {$processorFamily = 'Intel(R) Pentium(R) Processor Extreme Edition'}
189 {$processorFamily = 'Intel(R) Core(TM) Solo Processor'}
190 {$processorFamily = 'K7'}
191 {$processorFamily = 'Intel(R) Core(TM)2 Duo Processor'}
192 {$processorFamily = 'Intel(R) Core(TM)2 Solo processor'}
193 {$processorFamily = 'Intel(R) Core(TM)2 Extreme processor'}
194 {$processorFamily = 'Intel(R) Core(TM)2 Quad processor'}
195 {$processorFamily = 'Intel(R) Core(TM)2 Extreme mobile processor'}
196 {$processorFamily = 'Intel(R) Core(TM)2 Duo mobile processor'}
197 {$processorFamily = 'Intel(R) Core(TM)2 Solo mobile processor'}
198 {$processorFamily = 'Intel(R) Core(TM) i7 processor'}
199 {$processorFamily = 'Dual-Core Intel(R) Celeron(R) Processor'}
200 {$processorFamily = 'S/390 and zSeries Family'}
201 {$processorFamily = 'ESA/390 G4'}
202 {$processorFamily = 'ESA/390 G5'}
203 {$processorFamily = 'ESA/390 G6'}
204 {$processorFamily = 'z/Architectur base'}
205 {$processorFamily = 'Intel(R) Core(TM) i5 processor'}
206 {$processorFamily = 'Intel(R) Core(TM) i3 processor'}
{207..209 -contains $_} {$processorFamily = 'Reserved'}
210 {$processorFamily = 'VIA C7(TM)-M Processor Family'}
211 {$processorFamily = 'VIA C7(TM)-D Processor Family'}
212 {$processorFamily = 'VIA C7(TM) Processor Family'}
213 {$processorFamily = 'VIA Eden(TM) Processor Family'}
214 {$processorFamily = 'Multi-Core Intel(R) Xeon(R) processor'}
215 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor 3xxx Series'}
216 {$processorFamily = 'Quad-Core Intel(R) Xeon(R) processor 3xxx Series'}
217 {$processorFamily = 'VIA Nano(TM) Processor Family'}
218 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor 5xxx Series'}
219 {$processorFamily = 'Quad-Core Intel(R) Xeon(R) processor 5xxx Series'}
220 {$processorFamily = 'Reserved'}
221 {$processorFamily = 'Dual-Core Intel(R) Xeon(R) processor 7xxx Series'}
222 {$processorFamily = 'Quad-Core Intel(R) Xeon(R) processor 7xxx Series'}
223 {$processorFamily = 'Multi-Core Intel(R) Xeon(R) processor 7xxx Series'}
224 {$processorFamily = 'Multi-Core Intel(R) Xeon(R) processor 3400 Series'}
{225..227 -contains $_} {$processorFamily = 'Reserved'}
228 {$processorFamily = 'AMD Opteron(TM) 3000 Series Processor'}
229 {$processorFamily = 'AMD Sempron(TM) II Processor Family'}
230 {$processorFamily = 'Embedded AMD Opteron(TM) Quad-Core Processor Family'}
231 {$processorFamily = 'AMD Phenom(TM) Triple-Core Processor Family'}
232 {$processorFamily = 'AMD Turion(TM) Ultra Dual-Core Mobile Processor Family'}
233 {$processorFamily = 'AMD Turion(TM) Dual-Core Mobile Processor Family'}
234 {$processorFamily = 'AMD Athlon(TM) Dual-Core Processor Family'}
235 {$processorFamily = 'AMD Sempron(TM) SI Processor Family'}
236 {$processorFamily = 'AMD Phenom(TM) II Processor Family'}
237 {$processorFamily = 'AMD Athlon(TM) II Processor Family'}
238 {$processorFamily = 'Six-Core AMD Opteron(TM) Processor Family'}
239 {$processorFamily = 'AMD Sempron(TM) M Processor Family'}
{240..249 -contains $_} {$processorFamily = 'Reserved'}
250 {$processorFamily = 'i860'}
251 {$processorFamily = 'i960'}
{252..253 -contains $_} {$processorFamily = 'Reserved'}
254 {$processorFamily = 'Reserved (SMBIOS Extension)'}
255 {$processorFamily = 'Reserved (Un-initialized Flash Content - Lo)'}
{256..259 -contains $_} {$processorFamily = 'Reserved'}
260 {$processorFamily = 'SH-3'}
261 {$processorFamily = 'SH-4'}
{262..279 -contains $_} {$processorFamily = 'Reserved'}
280 {$processorFamily = 'ARM'}
281 {$processorFamily = 'StrongARM'}
{282..299 -contains $_} {$processorFamily = 'Reserved'}
300 {$processorFamily = '6x86'}
301 {$processorFamily = 'MediaGX'}
302 {$processorFamily = 'MII'}
{303..319 -contains $_} {$processorFamily = 'Reserved'}
320 {$processorFamily = 'WinChip'}
{321..349 -contains $_} {$processorFamily = 'Reserved'}
350 {$processorFamily = 'DSP'}
{351..499 -contains $_} {$processorFamily = 'Reserved'}
500 {$processorFamily = 'Video Processor'}
{501..65533 -contains $_} {$processorFamily = 'Reserved'}
65534 {$processorFamily = 'Reserved (For Future Special Purpose Assignmet'}
65535 {$processorFamily = 'Reserved'}
DEFAULT {$processorFamily = 'Unknown'}
}
Write-Output $processorFamily
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment