osinfo

Synopsis

Returns information about the operating system.

Important

The osinfo command and Microsoft/OSInfo resource are a proof-of-concept example for use with DSCv3. Don't use it in production.

Syntax

osinfo

Description

The osinfo command returns information about the operating system as a single line of compressed JSON without any whitespace.

The properties of the output JSON object are the properties for the Microsoft/OSInfo DSC Resource. For more information about those properties, see Microsoft/OSInfo.

Examples

Example 1 - Get operating system information

Call the command to return information about the operating system.

osinfo
{"$id":"https://developer.microsoft.com/json-schemas/dsc/os_info/20230303/Microsoft.Dsc.OS_Info.schema.json","family":"Linux","version":"20.04","codename":"focal","bitness":"64","architecture":"x86_64"}

The following code block shows the output with newlines and indentation for readability.

{
    "$id":          "https://developer.microsoft.com/json-schemas/dsc/os_info/20230303/Microsoft.Dsc.OS_Info.schema.json",
    "family":       "Linux",
    "version":      "20.04",
    "codename":     "focal",
    "bitness":      "64",
    "architecture": "x86_64"
}