Docs file content dsc resource by mimachniak · Pull Request #1764 · PowerShell/DSC · GitHub
Skip to content

Docs file content dsc resource - #1764

Open
Michal Machniak (mimachniak) wants to merge 7 commits into
PowerShell:mainfrom
mimachniak:docs-file-content-dsc-resource
Open

Michal Machniak (mimachniak) wants to merge 7 commits into
PowerShell:mainfrom
mimachniak:docs-file-content-dsc-resource

Conversation

@mimachniak

Copy link
Copy Markdown
Contributor

PR Summary
Add reference documentation for the Microsoft.Filesystem.File/Content DSC resource, including its properties, schema, capabilities, and exit codes. Add examples for getting, testing, setting, and removing file content, plus a configuration that uses _exist: true and a YAML literal block to create a file with multiline content.

PR Context
This documentation helps users understand how to manage local file content with DSC, including how to create missing parent directories, verify file state, and represent complex file content in a configuration. It also clarifies that the resource doesn’t support export.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 20:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The multiline example needs bracket escaping, and the export guidance must acknowledge DSC's Get fallback.

2 open issues
What changed in this PR

Adds reference documentation and usage examples for managing local file content with Microsoft.Filesystem.File/Content.

Changes:

  • Documents properties, schema, capabilities, and exit codes.
  • Adds examples for reading, testing, setting, and removing content.
  • Provides simple and multiline YAML configurations.
File Description
docs/​reference/​resources/​Microsoft/​Windows/​FileContent/​index.md Adds the resource reference.
docs/​reference/​resources/​Microsoft/​Windows/​FileContent/​examples/​manage-a-local-files-content.md Explains resource operations and example usage.
docs/​reference/​resources/​Microsoft/​Windows/​FileContent/​examples/​file-content.config.dsc.yaml Defines a simple file-content configuration.
docs/​reference/​resources/​Microsoft/​Windows/​FileContent/​examples/​complex-file-content.config.dsc.yaml Demonstrates multiline file content.

Review effort: Balanced

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.

2 participants