# environment::get-operating-system

[This is preliminary documentation and subject to change.]

Gets an OperatingSystem object that represents the current operating system.

### Usage

`OperatingSystem environment::get-operating-system()`

### Return Value

An OperatingSystem object that contains the current platform identifier and version number.

### Examples

- Output string representation of the current operating system.

      <echo message="OS=${operating-system::to-string(environment::get-operating-system())}" />

  If the operating system is Windows 2000, the output is:

      Microsoft Windows NT 5.0.2195.0

### Requirements

Assembly: NAnt.Core (0.91.3881.0)

### See Also

Operating System Functions