MCPcopy Index your code
hub / github.com/PowerShell/DSC

github.com/PowerShell/DSC @v3.2.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.2.2 ↗ · + Follow
2,514 symbols 6,937 edges 346 files 300 documented · 12%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DSCv3

[!NOTE] We welcome code contributions to this repository. For guidelines on how to contribute, see our CONTRIBUTING.md. Your feedback and participation help us improve DSCv3 for everyone.

What's DSCv3?

DSCv3 is the latest iteration of Microsoft's Desired State Configuration platform. DSCv3 is an open source command line application that abstracts the management of software components declaratively and idempotently. DSCv3 runs on Linux, macOS, and Windows without any external dependencies.

With DSCv3, you can:

  • Author resources to manage your systems in any language
  • Invoke individual resources
  • Create configuration documents that define the desired state of a system

Differences from PowerShell DSC

DSCv3 differs from PowerShell DSC in a few important ways:

  • DSCv3 doesn't depend on PowerShell. You can use DSCv3 without PowerShell installed and manage resources written in bash, python, C#, Go, or any other language.
  • DSCv3 use of PowerShell based resources does not depend on PSDesiredStateConfiguration module
  • DSCv3 doesn't include a local configuration manager. DSCv3 is invoked as a command. It doesn't run as a service.
  • Non-PowerShell resources define their schemas with JSON files, not MOF files.
  • Configuration documents are defined in JSON or YAML files, not PowerShell script files.

Importantly, while DSCv3 represents a major change to the DSC platform, DSCv3 is able to invoke PowerShell DSC Resources, including script-based and class-based DSC Resources, as they exist today. The configuration documents aren't compatible, but all published PowerShell DSC Resources are. You can use PowerShell DSC resources in DSCv3 with both Windows PowerShell and PowerShell.

Installing DSCv3

To install DSC v3:

  1. Download the latest release from this repository.
  2. Expand the release archive.
  3. Add the folder containing the expanded archive contents to the PATH.

For information on building and testing DSC from source, see the Contributing Guide.

Explore DSCv3

If you're new to DSC or configuration management, we recommend reviewing the documentation.

Learning and authoring tutorials

If you're already familiar with DSC or just want to start experimenting with v3, we recommend reviewing the Samples repository and the accompanying tutorial site. The Samples repo is ready to accept Pull Requests, which is a great way to contribute while v3 is in early phases of development.

Integrating with DSCv3

DSCv3 is a platform tool that abstracts the concerns for defining and invoking resources. Higher order tools, like Azure Machine Configuration, Azure Automanaged VM, and WinGet are early partners for DSCv3 as orchestration agents.

DSCv3 uses JSON schemas to define the structure of resources, configuration documents, and the outputs that DSCv3 returns. These schemas make it easier to integrate DSCv3 with other tools, because they standardize and document how to interface with DSCv3.

Code of Conduct

Please see our Code of Conduct before participating in this project.

Security Policy

For any security issues, please see our Security Policy.

Extension points exported contracts — how you extend this code

Function (Interface)
A function that can be invoked. [81 implementers]
lib/dsc-lib/src/functions/mod.rs
VSCodeKeywordDefinition (Interface)
Defines a VS Code keyword for the [`jsonschema`] crate. This trait requires the target type to implement both the [`Jso [14 …
lib/dsc-lib-jsonschema/src/vscode/keywords/vscode_keyword_definition.rs
WildcardFilterable (Interface)
Trait for types that support wildcard-based filter matching in export operations. [2 implementers]
resources/dism_dsc/src/util.rs
AsUnicodeString (Interface)
(no doc) [1 implementers]
archive/ntreg/src/lib.rs
Invoke (Interface)
The interface for a DSC resource. [1 implementers]
lib/dsc-lib/src/dscresources/dscresource.rs
DscRepoSchema (Interface)
Defines a reusable trait to simplify managing multiple versions of JSON Schemas for DSC structs and enums. This trait i [2 …
lib/dsc-lib-jsonschema/src/dsc_repo/dsc_repo_schema.rs
ResourceDiscovery (Interface)
(no doc) [1 implementers]
lib/dsc-lib/src/discovery/discovery_trait.rs
SchemaUtilityExtensions (Interface)
Provides utility extension methods for [`schemars::Schema`]. [1 implementers]
lib/dsc-lib-jsonschema/src/schema_utility_extensions.rs

Core symbols most depended-on inside this repo

parse_and_execute
called by 518
lib/dsc-lib/src/parser/mod.rs
as_str
called by 223
resources/sshdconfig/src/canonical_properties.rs
as_ref
called by 167
lib/dsc-lib/src/types/tag.rs
is_empty
called by 136
lib/dsc-lib/src/types/tag_list.rs
get
called by 105
lib/dsc-lib-registry/src/lib.rs
get
called by 61
lib/dsc-lib/src/dscresources/dscresource.rs
parse
called by 60
lib/dsc-lib/src/types/exit_code.rs
as_ref
called by 48
resources/windows_firewall/src/firewall.rs

Shape

Function 1,327
Method 757
Class 300
Enum 120
Interface 10

Languages

Rust100%

Modules by API surface

lib/dsc-lib-jsonschema/src/tests/schema_utility_extensions.rs42 symbols
lib/dsc-lib-jsonschema/src/schema_utility_extensions.rs41 symbols
lib/dsc-lib/src/dscresources/dscresource.rs39 symbols
resources/sshdconfig/src/parser.rs37 symbols
lib/dsc-lib/src/types/date_version.rs35 symbols
lib/dsc-lib/src/functions/format.rs35 symbols
lib/dsc-lib/src/configure/config_doc.rs33 symbols
resources/windows_firewall/src/firewall.rs31 symbols
lib/dsc-lib/tests/integration/types/semantic_version_req.rs31 symbols
lib/dsc-lib/tests/integration/types/date_version.rs31 symbols
lib/dsc-lib/src/configure/mod.rs30 symbols
lib/dsc-lib/src/functions/uri.rs27 symbols

For agents

$ claude mcp add DSC \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact