Muistiinpano
Tämän sivun käyttö edellyttää valtuutusta. Voit yrittää kirjautua sisään tai vaihtaa hakemistoa.
Tämän sivun käyttö edellyttää valtuutusta. Voit yrittää vaihtaa hakemistoa.
Synopsis
Returns information about the operating system.
Important
The osinfo command and Microsoft/OSInfo resource are a proof-of-concept example for use with
DSC. 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 command doesn't accept any options or arguments.
The properties of the output JSON object are the properties for the Microsoft/OSInfo DSC
Resource. For more information about those properties and using the resource, 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"
}