Skip to content

docs: Add reference documentation for Microsoft.Windows/Service#1522

Open
Gijsreyn wants to merge 1 commit intoPowerShell:mainfrom
Gijsreyn:update-winservice-docs
Open

docs: Add reference documentation for Microsoft.Windows/Service#1522
Gijsreyn wants to merge 1 commit intoPowerShell:mainfrom
Gijsreyn:update-winservice-docs

Conversation

@Gijsreyn
Copy link
Copy Markdown
Collaborator

@Gijsreyn Gijsreyn commented May 9, 2026

PR Summary

This pull request adds reference documentation for the built-in DSC resource Microsoft.Windows/Service. I've tried to do my best to follow proper syntax to easily get it merged on Microsoft Learn + redacted/omitted data to make it life version independently.

Copilot AI review requested due to automatic review settings May 9, 2026 09:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Microsoft Learn–style reference documentation for the built-in DSC resource Microsoft.Windows/Service, including example docs and a sample configuration file.

Changes:

  • Added the main Microsoft.Windows/Service resource reference page (properties, schema, exit codes, links).
  • Added example documentation for dsc resource get / dsc resource export.
  • Added an example DSC configuration document showing how to configure service status/start type.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
docs/reference/resources/Microsoft/Windows/Service/index.md New reference page for the Microsoft.Windows/Service resource (metadata, properties, schema, exit codes).
docs/reference/resources/Microsoft/Windows/Service/examples/service.config.dsc.yaml Sample configuration document defining two Microsoft.Windows/Service instances.
docs/reference/resources/Microsoft/Windows/Service/examples/get-service-status.md Example page demonstrating dsc resource get and dsc resource export.
docs/reference/resources/Microsoft/Windows/Service/examples/configure-windows-service.md Example page demonstrating how to apply a configuration document with dsc config test/set.

The configuration document for this example defines two instances of the `Service` resource.

The first instance ensures that the Windows Update service (`wuauserv`) is stopped and configured
for manual start. The second instance ensures that the Windows Time service (`w32tm`) is running
Comment on lines +81 to +82
DSC emits one JSON object per service to stdout. You can pipe the output to a file or process it
further with other tools.
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