Tuesday, December 12, 2017

How do you find details about your computer operating system using Windows Management Instrumentation?

Call up WMIC from a command prompt to begin as shown.e  It is better to start the CMD  as an adminsitrator.
-----------
C:\WINDOWS\system32>Wmic
wmic:root\cli>
----------------
Now you are at the root, use the following statement to find the help file for the Operating System (OS):
------------
wmic:root\cli>OS /?
OS - Installed Operating System/s management.
HINT: BNF for Alias usage.
( [WMIObject] | [] | [] ) [].

USAGE:
OS ASSOC []
OS CALL []
OS CREATE
OS DELETE
OS GET [] []
OS LIST [] []
OS SET []

-------------------
You should get help for each of these as well. Here is an example for OS Get:
Execute the following statement:
-------------
wmic:root\cli>OS GET /?
Property get operations.
USAGE:
GET [] []
NOTE: ::= |

The following properties are available:
Property                                Type                    Operation
========                                ====                    =========
BootDevice                              N/A                     N/A
BuildNumber                             N/A                     N/A
BuildType                               N/A                     N/A
CSDVersion                              N/A                     N/A
CSName                                  N/A                     N/A
CodeSet                                 N/A                     N/A
CountryCode                             N/A                     N/A
CurrentTimeZone                         N/A                     N/A
Debug                                   N/A                     N/A
Description                             N/A                     N/A
Distributed                             N/A                     N/A
EncryptionLevel                         N/A                     N/A
ForegroundApplicationBoost              N/A                     N/A
FreePhysicalMemory                      N/A                     N/A
FreeSpaceInPagingFiles                  N/A                     N/A
FreeVirtualMemory                       N/A                     N/A
InstallDate                             N/A                     N/A
LastBootUpTime                          N/A                     N/A
LocalDateTime                           N/A                     N/A
Locale                                  N/A                     N/A
Manufacturer                            N/A                     N/A
MaxNumberOfProcesses                    N/A                     N/A
MaxProcessMemorySize                    N/A                     N/A
Name                                    N/A                     N/A
NumberOfLicensedUsers                   N/A                     N/A
NumberOfProcesses                       N/A                     N/A
NumberOfUsers                           N/A                     N/A
OSLanguage                              N/A                     N/A
OSProductSuite                          N/A                     N/A
OSType                                  N/A                     N/A
Organization                            N/A                     N/A
OtherTypeDescription                    N/A                     N/A
PlusProductID                           N/A                     N/A
PlusVersionNumber                       N/A                     N/A
Primary                                 N/A                     N/A
QuantumLength                           N/A                     N/A
QuantumType                             N/A                     N/A
RegisteredUser                          N/A                     N/A
SerialNumber                            N/A                     N/A
ServicePackMajorVersion                 N/A                     N/A
ServicePackMinorVersion                 N/A                     N/A
SizeStoredInPagingFiles                 N/A                     N/A
Status                                  N/A                     N/A
SystemDevice                            N/A                     N/A
SystemDirectory                         N/A                     N/A
SystemDrive                             N/A                     N/A
TotalSwapSpaceSize                      N/A                     N/A
TotalVirtualMemorySize                  N/A                     N/A
TotalVisibleMemorySize                  N/A                     N/A
Version                                 N/A                     N/A
WindowsDirectory                        N/A                     N/A
The following GET switches are available:
/VALUE                       - Return value.
/ALL(default)                - Return the data and metadata for the attribute.
/TRANSLATE:      - Translate output via values from
.
/EVERY: [/REPEAT:] - Returns value every (X interval) seconds, If /REPEAT specified the command is executed times.
/FORMAT:   - Keyword/XSL filename to process the XML results.

NOTE: Order of /TRANSLATE and /FORMAT switches influences the appearance of output.
Case1: If /TRANSLATE precedes /FORMAT, then translation of results will be followed by formatting.
Case2: If /TRANSLATE succeeds /FORMAT, then translation of the formatted results will be done.
------------
Now here are a few things about my operating system (Windows 10 Professional)
----------------
wmic:root\cli>OS GET BootDevice
BootDevice
\Device\HarddiskVolume2

wmic:root\cli>OS GET SerialNumber
SerialNumber
00330-80000-00000-AA401

wmic:root\cli>OS GET Manufacturer
Manufacturer
Microsoft Corporation

wmic:root\cli>OS GET Version
Version
10.0.17025

------------
This was just a sample of what you can find. You can try a whole lot on yourself.

No comments: