This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
howdy y'all,
this fabulous answer by SeeminglyScience ...
SeeminglyScience comments on is there a builtin enum for "PCSystemType"?
— https://www.reddit.com/r/PowerShell/comments/8jdczz/is_there_a_builtin_enum_for_pcsystemtype/dyzw5fq/
... got me to fiddling with the code. it gave me fits until i realized 3 things ...
- the
CIM_*
classes don't necessarily contain the same qualifiers as theWin32_*
classes
specifically,CIM_ComputerSystem
does not containPCSystemType
in the qualifier list. it shows in the property list from aGet-CimInstance
call, but the qualifier list aint there. [frown] - the
ValueMap
key list does NOT exist for all theValue
items
for instance, theDomainRole
qualifier has only theValue
list. - those items that DO have a
ValueMap
seem to only have a direct-to-index mapping
[edit - MOST ValueMap items are direct indexes into Values.Win32_OperatingSystem ProductType
is NOT one such. ValueMap = 1,2,3 & Values IndexRange = 0,1,2]
for example, theValueMap=0
indexes toValue[0]
in all the cases i could find.
that has taken me two days to work thru. [grin] it's resulted in dreams about that chunk of code that have been danged vivid.
i rarely remember having dreams. when i do, they are usually about a book i am reading, a game i am playing, OR code that is giving me fits.
so, do any of y'all have dreams about your current code problems?
take care,
lee
Subreddit
Post Details
- Posted
- 6 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/PowerShell/...