- WMI Library -
WMI Libraly > Win32_OperatingSystem Class

Win32_OperatingSystem Class

The Win32_OperatingSystem class represents an operating system installed on a Win32 computer system. Any operating system that can be installed on a Win32 system is a descendent (or member) of this class.
Example: Microsoft Windows 95.
Namespace value is root/CIMV2.
WMI Provider value is CIMWin32.


Properties

  • BootDevice
  • The BootDevice property indicates the name of the disk drive from which the Win32 operating system boots.
    Example: \\Device\Harddisk0.

  • BuildNumber
  • The BuildNumber property indicates the build number of the operating system. It can be used for more precise versioning information than product release version numbers
    Example: 1381

  • BuildType
  • The BuildType property indicates the type of build used for the operating system. Examples are retail build and checked build.

  • Caption
  • The Caption property is a short textual description (one-line string) of the object.

  • CodeSet
  • The CodeSet property indicates the code page value used by the operating system. A code page contains a character table used by the operating system to translate strings for different languages. The American National Standards Institute (ANSI) lists values that represent defined code pages. If the operating system does not use an ANSI code page, this member will be set to 0. The CodeSet string can use up to six characters to define the code page value.
    Example: 1255.

  • CountryCode
  • The CountryCode property indicates the code for the country/regionused by the operating system. Values are based on international phone dialing prefixes (also referred to as IBM country/region codes). The CountryCode string can use up to six characters to define the country/region code value.
    Example: 1 for the United States)

  • CreationClassName
  • CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.

  • CSCreationClassName
  • CSCreationClassName contains the scoping computer system's creation class name.

  • CSDVersion
  • The CSDVersion property contains a null-terminated string, that indicates the latest Service Pack installed on the computer system. If no Service Pack is installed, the string is NULL. For computer systems running Windows 95, this property contains a null-terminated string that provides arbitrary additional information about the operating system.
    Example: Service Pack 3.

  • CSName
  • CSName contains the scoping computer system's name.

  • CurrentTimeZone
  • CurrentTimeZone indicates the number of minutes the operating system is offset from Greenwich Mean Time. Either the number is positive, negative or zero.

  • DataExecutionPrevention_32BitApplications
  • If true, indicates that 32-bit applications are running with Data Execution Prevention (DEP) applied. (false if DataExecutionPrevention_Available = false)

  • DataExecutionPrevention_Available
  • If true, indicates that the hardware supports Windows Data Execution Prevention (DEP) technology. DEP ensures that all memory locations are marked with a non-executable attribute unless the memory location explicitly contains executable code. This can help mitigate certain types of buffer overrun security exploits. If DEP is available, 64-bit applications are automatically protected. To determine if DEP has been enabled for 32-bit applications and drivers, use the DataExecutionPrevention_ properties

  • DataExecutionPrevention_Drivers
  • If true, indicates that drivers are running with Data Execution Prevention (DEP) applied. (false if DataExecutionPrevention_Available = false)

  • DataExecutionPrevention_SupportPolicy
  • The DataExecutionPrevention_SupportPolicy indicates which one of four Data Execution Prevention (DEP) settings is applied. Each setting varies by the extent to which DEP is applied to 32-bit applications. Note that DEP is always applied to the Windows kernel. Always On (not available in the user interface) indicates that DEP is enabled for all 32-bit applications on the machine with no exceptions. OptOut indicates DEP is on by default for all 32-bit applications and that a user or administrator must explicitly remove support for a 32-bit application by adding to an exceptions list. OptIn indicates DEP is on for a limited number of binaries, the kernel, and all Windows services but it is off by default for all 32-bit applications; a user or administrator must explicitly choose the AlwaysOn (not available in the user interface) or OptOut setting before DEP can be applied to 32-bit applications. AlwaysOff (not available in the user interface) indicates DEP is turned off for all 32-bit applications on the machine.

  • Debug
  • The Debug property indicates whether the operating system is a checked (debug) build. Checked builds provide error checking, argument verification, and system debugging code. Additional code in a checked binary generates a kernel debugger error message and breaks into the debugger. This helps immediately determine the cause and location of the error. Performance suffers in the checked build due to the additional code that is executed.
    Values: TRUE or FALSE, A value of TRUE indicates the debugging version of User.exe is installed.

  • Description
  • The Description property provides a description of the Windows operating system. Some user interfaces (those that allow editing of this description) limit its length to 48 characters.

  • Distributed
  • Boolean indicating whether the operating system is distributed across several computer system nodes. If so, these nodes should be grouped as a cluster.

  • EncryptionLevel
  • The EncryptionLevel property specifies if the encryption level for secure transactions is 40-bit, 128-bit, or n-bit encryption.

  • ForegroundApplicationBoost
  • The ForegroundApplicationBoost property indicates the increase in priority given to the foreground application. On computer systems running Windows NT 4.0 and Windows 2000, application boost is implemented by giving an application more execution time slices (quantum lengths). A ForegroundApplicationBoost value of 0 indicates the system boosts the quantum length by 6; if 1, then 12; and if 2 then 18. On Windows NT 3.51 and earlier, application boost is implemented by increasing the scheduling priority. For these systems, the scheduling priority is increased by the value of this property. The default value is 2.

  • FreePhysicalMemory
  • Number of kilobytes of physical memory currently unused and available

  • FreeSpaceInPagingFiles
  • The total number of KBytes that can be mapped into the OperatingSystem's paging files without causing any other pages to be swapped out. 0 indicates that there are no paging files.

  • FreeVirtualMemory
  • Number of kilobytes of virtual memory currently unused and available. For example, this may be calculated by adding the amount of free RAM to the amount of free paging space (i.e., adding the properties, FreePhysicalMemory and FreeSpaceInPagingFiles).

  • InstallDate
  • The InstallDate property is datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.

  • LargeSystemCache
  • The LargeSystemCache property indicates whether to optimize memory for applications (value=0) or for system performance (value=1).

  • LastBootUpTime
  • Time when the operating system was last booted

  • LocalDateTime
  • Operating system's notion of the local date and time of day.

  • Locale
  • The Locale property indicates the language identifier used by the operating system. A language identifier is a standard international numeric abbreviation for a country or region. Each language has a unique language identifier (LANGID), a 16-bit value that consists of a primary language identifier and a secondary language identifier.

  • Manufacturer
  • The Manufacturer property indicates the name of the operating system manufacturer. For Win32 systems this value will be Microsoft Corporation.

  • MaxNumberOfProcesses
  • Maximum number of process contexts the operating system can support. If there is no fixed maximum, the value should be 0. On systems that have a fixed maximum, this object can help diagnose failures that occur when the maximum is reached. If unknown, enter -1.

  • MaxProcessMemorySize
  • Maximum number of kilobytes of memory that can be allocated to a process. For operating systems with no virtual memory, this value is typically equal to the total amount of physical memory minus memory used by the BIOS and OS. For some operating systems, this value may be infinity - in which case, 0 should be entered. In other cases, this value could be a constant - for example, 2G or 4G.

  • MUILanguages
  • The MUILanguages property indicates the MUI Languages installed in the system.
    Example: en-us.

  • Name
  • Name of the operating system instance within a computer system.

  • NumberOfLicensedUsers
  • Number of user licenses for the operating system. If unlimited, enter 0. If unknown, enter -1.

  • NumberOfProcesses
  • Number of process contexts currently loaded or running on the operating system.

  • NumberOfUsers
  • Number of user sessions for which the operating system is currently storing state information

  • OperatingSystemSKU
  • The OperatingSystemSKU property identifies the SKU of the operating system.

  • Organization
  • The Organization property indicates the registered user's (of the operating system) company name.
    Example: Microsoft Corporation.

  • OSArchitecture
  • The OSArchitecture property indicates the Architecture of the operating system.Example: 32-bit, 64-bit Intel, 64-bit AMD

  • OSLanguage
  • The OSLanguage property indicates which language version of the operating system is installed.
    Example: 0x0807 (German, Switzerland)

  • OSProductSuite
  • The OSProductSuite property identifies installed and licensed system product additions to the operating system.

  • OSType
  • A integer indicating the type of operating system.

  • OtherTypeDescription
  • A string describing the manufacturer and operating system type - used when the operating system property, OSType, is set to 1 ("Other"). The format of the string inserted in OtherTypeDescription should be similar in format to the Values strings defined for OSType. OtherTypeDescription should be set to NULL when OSType is any value other than 1.

  • PAEEnabled
  • Not applicable.

  • PlusProductID
  • The PlusProductID property contains the product identification number for the Windows Plus! operating system enhancement software (if installed).

  • PlusVersionNumber
  • The PlusVersionNumber property contains the version number of the Windows Plus! operating system enhancement software (if installed).

  • Primary
  • The Primary property determines whether this is the primary operating system.
    Values: TRUE or FALSE. A value of TRUE indicates this is the primary operating system.

  • ProductType
  • The ProductType property indicates additional information about the system. This member can be one of the following values:
    1 - Work Station
    2 - Domain Controller
    3 - Server

  • RegisteredUser
  • The RegisteredUser property indicates the name of the registered user of the operating system.
    Example: Jane Doe

  • SerialNumber
  • The SerialNumber property indicates the operating system product serial identification number.
    Example:10497-OEM-0031416-71674.

  • ServicePackMajorVersion
  • The ServicePackMajorVersion property indicates the major version number of the service pack installed on the computer system. If no service pack has been installed, the value is zero. ServicePackMajorVersion is valid for computers running Windows 2000 and later (NULL otherwise).

  • ServicePackMinorVersion
  • The ServicePackMinorVersion property indicates the minor version number of the service pack installed on the computer system. If no service pack has been installed, the value is zero. ServicePackMinorVersion is valid for computers running Windows 2000 and later (NULL otherwise).

  • SizeStoredInPagingFiles
  • The total number of kilobytes that can be stored in the operating system's paging files. Note that this number does not represent the actual physical size of the paging file on disk. 0 indicates that there are no paging files.

  • Status
  • The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are "OK", "Degraded" and "Pred Fail". "Pred Fail" indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are "Error", "Starting", "Stopping" and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither "OK" nor in one of the other states.

  • SuiteMask
  • The SuiteMask property indicates a set of bit flags that identify the product suites available on the system. This member can be a combination of the following values:
    0 - Windows Server 2003, Small Business Edition
    1 - Windows Server 2003, Enterprise Edition
    2 - Windows Server 2003, Backoffice Edition
    3 - Windows Server 2003, Communications Edition
    4 - Microsoft Terminal Services
    5 - Windows Server 2003, Small Business Edition Restricted
    6 - Windows XP Embedded
    7 - Windows Server 2003, Datacenter Edition
    8 - Single User
    9 - Windows XP Home Edition
    10 - Windows Server 2003, Web Edition

  • SystemDevice
  • The SystemDevice property indicates the physical disk partition the operating system is installed on.

  • SystemDirectory
  • The SystemDirectory property indicates the system directory of the operating system.
    Example: C:\WINDOWS\SYSTEM32

  • SystemDrive
  • The SystemDrive property contains the letter of the disk drive that the operating system resides on.
    Example: C:

  • TotalSwapSpaceSize
  • Total swap space in kilobytes. This value may be NULL (unspecified) if swap space is not distinguished from page files. However, some operating systems distinguish these concepts. For example, in UNIX, whole processes can be 'swapped out' when the free page list falls and remains below a specified amount.

  • TotalVirtualMemorySize
  • Number of kilobytes of virtual memory. For example, this may be calculated by adding the amount of total RAM to the amount of paging space (i.e., adding the amount of memory in/aggregated by the computer system to the property, SizeStoredInPagingFiles.

  • TotalVisibleMemorySize
  • The total amount of physical memory (in Kbytes) available to the OperatingSystem. This value does not necessarily indicate the true amount of physical memory, but what is reported to the OperatingSystem as available to it.

  • Version
  • The Version property indicates the version number of the operating system.
    Example: 4.0

  • WindowsDirectory
  • The WindowsDirectory property indicates the Windows directory of the operating system.
    Example: C:\WINDOWS


    Methods

  • Reboot
  • The Reboot method shuts down the computer system, then restarts it. On computers running Windows NT/2000, the calling process must have the SE_SHUTDOWN_NAME privilege.
    The method returns an integer value that can be interpretted as follows:
    0 - Successful completion.
    Other - For integer values other than those listed above, refer to Win32 error code documentation.

  • Shutdown
  • The Shutdown method unloads programs and DLLs to the point where it is safe to turn off the computer. All file buffers are flushed to disk, and all running processes are stopped. On computer systems running Windows NT/2000, the calling process must have the SE_SHUTDOWN_NAME privilege.
    The method returns an integer value that can be interpretted as follows:
    0 - Successful completion.
    Other - For integer values other than those listed above, refer to Win32 error code documentation.

  • Win32Shutdown
  • The Win32Shutdown method provides the full set of shutdown options supported by Win32 operating systems.
    The method returns an integer value that can be interpretted as follows:
    0 - Successful completion.
    Other - For integer values other than those listed above, refer to Win32 error code documentation.

  • Win32ShutdownTracker
  • The Win32ShutdownTracker method provides the full set of shutdown options supported by Win32 operating systems.
    Comments, reason for shutdown and timeout can be specifiedwhich is not available in Win32Shutdown method.The method returns an integer value that can be interpretted as follows:
    0 - Successful completion.
    Other - For integer values other than those listed above, refer to Win32 error code documentation.

  • SetDateTime
  • The SetDateTime method sets the current system time on the computer. On computer systems running Windows NT/2000, the calling process must have the SE_SYSTEMTIME_NAME privilege.
    The method returns an integer value that can be interpretted as follows:
    0 - Successful completion.
    Other - For integer values other than those listed above, refer to Win32 error code documentation.


    Example WQL

    SELECT * FROM Win32_OperatingSystem
    About this site information

    This contents is created by WMI having class information.
    WMI Environment is Windows Server 2008 R2 Enterprise Edition.

    This link is Microsoft documents for "Managing Windows with WMI".
    That is VB(Visual Basic) scripting sample.
    This link is Microsoft documents for "Advanced Programming Topics in WMI .NET".
    That is VB.net(Visual Basic .net) scripting sample.

    - WMI Library -
    http://library.wmifun.net/

    WMI useful by VB,VB.Net,VC,VC.Net,VC#.Net,VBS(WSH),PowerShell for PC asset management, system monitoring and collecting hardware and software inventory.

    This website is created by Toh.
    Copyright(C) 1997-2016 WMI Fun !!. All rights reserved.
    ^ Go to the top...