Home Reference WMI Reference root CIMV2 Win32_OperatingSystem
 

Win32_OperatingSystem

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.

Quick Start

Properties

Most WMI properties are read-only. You can only read values but not change them. Few properties are also writeable. You can assign new values to those properties.

Writeable properties are marked with this icon:   

BootDevice

Data type String

The BootDevice property indicates the name of the disk drive from which the Win32 operating system boots.

Example: \\Device\Harddisk0.

BuildNumber

Data type String

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

Data type String

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

Caption

Data type String

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

CodeSet

Data type String

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

Data type String

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

Data type String

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

Data type String

CSCreationClassName contains the scoping computer system’s creation class name.

CSDVersion

Data type String

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

Data type String

CSName contains the scoping computer system’s name.

CurrentTimeZone

Data type SInt16

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

Data type Boolean

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

DataExecutionPrevention_Available

Data type Boolean

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

Data type Boolean

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

DataExecutionPrevention_SupportPolicy

Data type UInt8

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.

$DataExecutionPrevention_SupportPolicy_ReturnValue = @{ 0='Always Off' 1='Always On' 2='Opt In' 3='Opt Out' }

Debug

Data type Boolean

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

Data type String

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

Data type Boolean

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

EncryptionLevel

Data type UInt32

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

  ForegroundApplicationBoost

Data type UInt8

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

Data type UInt64

Number of kilobytes of physical memory currently unused and available

FreeSpaceInPagingFiles

Data type UInt64

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

Data type UInt64

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

Data type DateTime

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

Data type UInt32

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

$LargeSystemCache_ReturnValue = @{ 0='Optimize for Applications' 1='Optimize for System Performance' }

LastBootUpTime

Data type DateTime

Time when the operating system was last booted

LocalDateTime

Data type DateTime

Operating system’s notion of the local date and time of day.

Locale

Data type String

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

Data type String

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

MaxNumberOfProcesses

Data type UInt32

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

Data type UInt64

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

Data type String[] (Array)

The MUILanguages property indicates the MUI Languages installed in the system.

Example: en-us.

 This property is an array. It contains multiple values. Use square brackets to index individual values, or use the PowerShell -join operator to convert the array to a string.

Name

Data type String

Name of the operating system instance within a computer system.

NumberOfLicensedUsers

Data type UInt32

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

NumberOfProcesses

Data type UInt32

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

NumberOfUsers

Data type UInt32

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

OperatingSystemSKU

Data type UInt32

The OperatingSystemSKU property identifies the SKU of the operating system.

$OperatingSystemSKU_ReturnValue = @{ 0='Undefined' 1='Ultimate Edition' 2='Home Basic Edition' 3='Home Premium Edition' 4='Enterprise Edition' 5='Home Basic N Edition' 6='Business Edition' 7='Standard Server Edition' 8='Datacenter Server Edition' 9='Small Business Server Edition' 10='Enterprise Server Edition' 11='Starter Edition' 12='Datacenter Server Core Edition' 13='Standard Server Core Edition' 14='Enterprise Server Core Edition' 15='Enterprise Server IA64 Edition' 16='Business N Edition' 17='Web Server Edition' 18='Cluster Server Edition' 19='Home Server Edition' 20='Storage Express Server Edition' 21='Storage Standard Server Edition' 22='Storage Workgroup Server Edition' 23='Storage Enterprise Server Edition' 24='Server For Small Business Edition' 25='Small Business Server Premium Edition' 26='(unknown)' }

Organization

Data type String

The Organization property indicates the registered user’s (of the operating system) company name.

Example: Microsoft Corporation.

OSArchitecture

Data type String

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

OSLanguage

Data type UInt32

The OSLanguage property indicates which language version of the operating system is installed.

Example: 0x0807 (German, Switzerland)

OSProductSuite

Data type UInt32

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

$SmallBusiness=1 $Enterprise=2 $BackOffice=4 $CommunicationServer=8 $TerminalServer=16 $SmallBusinessRestricted=32 $EmbeddedNT=64 $DataCenter=128$OSProductSuite = $TerminalServer + $SmallBusinessRestricted

OSType

Data type UInt16

A integer indicating the type of operating system.

OtherTypeDescription

Data type String

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

Data type Boolean

PlusProductID

Data type String

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

PlusVersionNumber

Data type String

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

PortableOperatingSystem

Data type Boolean

The PortableOperatingSystem property indicates if theOperating System is booting from a supported locally connected storagedevice.

Values: $true or $false, A value of $true indicates the OperatingSystem was booted from a supported locally connected storage device.

Primary

Data type Boolean

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

Data type UInt32

The ProductType property indicates additional information about the system. This member can be one of the following values:

$ProductType_ReturnValue = @{ 1='Work Station' 2='Domain Controller' 3='Server' }

RegisteredUser

Data type String

The RegisteredUser property indicates the name of the registered user of the operating system.

Example: Jane Doe

SerialNumber

Data type String

The SerialNumber property indicates the operating system product serial identification number.

Example:10497-OEM-0031416-71674.

ServicePackMajorVersion

Data type UInt16

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

Data type UInt16

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

Data type UInt64

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

Data type String

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.

'OK','Error','Degraded','Unknown','Pred Fail','Starting','Stopping','Service','Stressed','NonRecover','No Contact','Lost Comm'

SuiteMask

Data type UInt32

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:

$WindowsServer2003=1 $SmallBusinessEdition=2 $WindowsServer2003=4 $EnterpriseEdition=8 $WindowsServer2003=16 $BackofficeEdition=32 $WindowsServer2003=64 $CommunicationsEdition=128 $MicrosoftTerminalServices=256 $WindowsServer2003=512 $SmallBusinessEditionRestricted=1024 $WindowsXPEmbedded=2048 $WindowsServer2003=4096 $DatacenterEdition=8192 $SingleUser=16384 $WindowsXPHomeEdition=32768 $WindowsServer2003=65536 $WebEdition=131072$SuiteMask = $WindowsServer2003 + $SmallBusinessEdition

SystemDevice

Data type String

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

SystemDirectory

Data type String

The SystemDirectory property indicates the system directory of the operating system.

Example: C:\WINDOWS\SYSTEM32

SystemDrive

Data type String

The SystemDrive property contains the letter of the disk drive that the operating system resides on.

Example: C:

TotalSwapSpaceSize

Data type UInt64

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

Data type UInt64

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

Data type UInt64

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

Data type String

The Version property indicates the version number of the operating system.

Example: 4.0

WindowsDirectory

Data type String

The WindowsDirectory property indicates the Windows directory of the operating system.

Example: C:\WINDOWS

Methods

Examples

See Also

Help and Questions

  Community Content

You are cordially invited to add knowledge to this page. If you have sample code or additional information related to this WMI class, please share it. Use the comment form to send your information. We will edit and incorparate it into the reference library. Thank you!

 

Facebooktwittergoogle_pluspinterestlinkedinFacebooktwittergoogle_pluspinterestlinkedin