description | ms.date | ms.topic | title |
---|---|---|---|
Command line reference for the 'osinfo' command |
08/22/2023 |
reference |
osinfo |
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.
osinfo
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.
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"
}
{"$id":"https://developer.microsoft.com/json-schemas/dsc/os_info/20230303/Microsoft.Dsc.OS_Info.schema.json","family":"MacOS","version":"13.5.0","bitness":"64","architecture":"arm64"}
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": "MacOS",
"version": "13.5.0",
"bitness": "64",
"architecture": "arm64"
}
{"$id":"https://developer.microsoft.com/json-schemas/dsc/os_info/20230303/Microsoft.Dsc.OS_Info.schema.json","family":"Windows","version":"10.0.22621","edition":"Windows 11 Enterprise","bitness":"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": "Windows",
"version": "10.0.22621",
"edition": "Windows 11 Enterprise",
"bitness": "64"
}