Skip to content

(DOCS) Update CLI reference and conceptual docs for v3.0.0 #672

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

michaeltlombardi
Copy link
Collaborator

@michaeltlombardi michaeltlombardi commented Mar 5, 2025

PR Summary

This changeset updates and adds reference documentation for the 3.0.0 GA release of DSC.

It includes:

  • Updated CLI reference
  • Updated and expanded documentation for concepts
  • Scaffold reference for built-in resources

Deferred to future PRs:

  • Reference docs for built-in resources
  • Updates to schema docs

PR Context

@michaeltlombardi michaeltlombardi changed the title (DOCS) Update reference docs for v3.0.0 (DOCS) Update CLI reference and conceptual docs for v3.0.0 Mar 17, 2025
@michaeltlombardi michaeltlombardi marked this pull request as ready for review March 17, 2025 22:15
---------------------------------------------------------------
DesiredStateConfiguration-Preview 9PCX3HX4HZ0Z Unknown msstore
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a small remark for the users telling something like:

[!INFO]
You can use either msstore or winget as the source. When using winget, it leverages the .zip file, whereas msstore uses the .msixbundle.

Prior to this change, the docs folder didn't include any conceptual
documentation, only reference documents.

This change copies existing concept docs into the folder, updates them
for GA, and adds new conceptual documentation to make it easier for
new users to learn about DSC and start using it.
This change updates the reference docs for:

- `Microsoft/OSInfo` resource
- `osinfo` CLI tool
- `Microsoft.Windows/Registry` resource
- `registry` CLI tool

These are the only resources currently documented on
the live docs site.
Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need more time to go through all the docs

type: Microsoft.Windows/Registry
result:
actualState:
keyPath: HKCU\example\key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enclose in single quotes so that the backslash doesn't need to be escaped

Suggested change
keyPath: HKCU\example\key
keyPath: 'HKCU\example\key'

- Export a new configuration document with every instance of a set of resources with the
`dsc config export` command.

Configuration documents are YAML or JSON files that contain a single object. The object's
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it help to mention relationship to ARM templates since those have more docs and examples?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And given the very positive reaction to Bicep at PS Summit, this makes it sound like we only support the two languages, when we actually support a third, as an abstraction of the JSON.

- Provides metadata about the operation as a whole and for each resource instance.

```sh
dsc config test --file /example.config.dsc.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dsc config test --file /example.config.dsc.yaml
dsc config test --file ./example.config.dsc.yaml

Is this missing the period? Otherwise it's an absolute path

```json
"json.schemas": [
{
"fileMatch": ["**/*.dsc.resource.json", ],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"fileMatch": ["**/*.dsc.resource.json", ],
"fileMatch": ["**/*.dsc.resource.json"],

- Export a new configuration document with every instance of a set of resources with the
`dsc config export` command.

Configuration documents are YAML or JSON files that contain a single object. The object's
Copy link
Member

@mgreenegit mgreenegit Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Configuration documents are YAML or JSON files that contain a single object. The object's
Configuration documents contain a single object formatted as YAML, JSON, or Bicep (which compiles to JSON). The object's

`dsc config export` command.

Configuration documents are YAML or JSON files that contain a single object. The object's
properties define how DSC processes the document. The top-level properties for a document are:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
properties define how DSC processes the document. The top-level properties for a document are:
properties define how DSC processes the document. It is intentional that DSC configuration documents
should be familiar to authors accustomed to working with
[Azure Resource Manager deployment templates](./azure/azure-resource-manager/templates/).
The top-level properties for a document are:

Comment on lines +65 to +76
### HyperText Markup Language (HTML) format

HTML files can be viewed by web browsers such as **Microsoft Edge**. The following example shows
how to save the output of a command to an HTML file.

```powershell
dsc resource list | ConvertFrom-Json | ConvertTo-HTML | Out-File .\myFile.html
Invoke-Item .\myFile.html
```

The `Invoke-Item` command opens the file in your default web browser.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### HyperText Markup Language (HTML) format
HTML files can be viewed by web browsers such as **Microsoft Edge**. The following example shows
how to save the output of a command to an HTML file.
```powershell
dsc resource list | ConvertFrom-Json | ConvertTo-HTML | Out-File .\myFile.html
Invoke-Item .\myFile.html
```
The `Invoke-Item` command opens the file in your default web browser.

unfortunately we need to remove these until an issue is resolved in PWSH

Copy link
Member

@mgreenegit mgreenegit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is such as massive PR, it will be easier to "nit pick" using small PRs after it is published. At a high level, everything looks good to me.
:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants