Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Desired State Configuration CompletionNew to Visual Studio Code? Get it now.
Desired State Configuration Completion

Desired State Configuration Completion

LibreDsc

|
2 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Desired State Configuration Completion extension for Visual Studio Code

A Visual Studio Code extension that provides intelligent autocompletion for Microsoft Desired State Configuration (DSC) configuration documents. Write DSC configurations faster with IntelliSense support for resource types, properties, and values in YAML files.

Features

  • Resource type completion: Auto-complete DSC resource types with snippets that include all properties or just required ones
  • Property completion: IntelliSense for resource properties with type information and descriptions
  • Value completion: Contextual suggestions for property values including enums, booleans, and type hints
  • Schema validation: Real-time property information fetched from DSC resource schemas
  • Adapter support: Discover and work with adapter-provided resources (PowerShell, WMI, etc.)

About

Microsoft DSC is designed as a platform without a current domain-specific language (DSL), allowing configurations to be authored in standard YAML/JSON documents. While this provides flexibility and tool-agnostic design, it can make authoring configurations more challenging without IDE support.

This extension is an experimental project created to enhance the DSC authoring experience by bringing IDE-level autocompletion and IntelliSense to configuration documents. It helps bridge the gap between DSC's platform approach and the developer experience of traditional configuration management tools with dedicated languages.

How It Works

Behind the scenes, the extension:

  1. Discovers resources: Connects to the DSC CLI via the Model Context Protocol (MCP) or command-line invocation to list available resources on your system
  2. Caches schemas: Fetches and caches JSON schemas for each resource to provide accurate property information
  3. Persistent cache: Stores discovered resources locally for fast activation (%LocalAppData%\dsc\vscode-completion-cache.json)
  4. Adapter integration: Queries DSC adapters to discover resources from PowerShell DSC, Windows PowerShell, and other providers
  5. Real-time updates: Monitors DSC installation directory for new or updated resource manifests

The extension intelligently uses MCP when available for better performance, falling back to CLI commands when needed. Resource schemas are fetched on-demand and cached to minimize overhead.

Command Palette

Open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and use:

Command Description
DSC: Clear Cache Clear the persistent resource cache and rediscover all resources. Use this if resources aren't appearing or after installing new DSC resources.

Requirements

  • Microsoft DSC must be installed and available in your PATH
  • VS Code 1.80.0 or higher

Getting Started

  1. Install dsc on your system
  2. Install this extension from the VS Code Marketplace
  3. Open or create a DSC configuration file (.dsc.config.yaml or .dsc.config.yml)
  4. Start typing type: to see available resources
  5. Use IntelliSense (Ctrl+Space) to explore properties and values

Troubleshooting

If you're experiencing issues with resource completion or the extension isn't working as expected, you can check the extension logs for diagnostic information.

Viewing the Microsoft DSC Log

  1. Open the Output panel in VS Code:
    • Press Ctrl+Shift+U (Windows/Linux) or Cmd+Shift+U (macOS)
    • Or go to View → Output from the menu
  2. In the Output panel, click the dropdown menu on the right side
  3. Select Microsoft DSC from the list of output channels
  4. Review the log messages for any errors or warnings

The log will show:

  • Resource discovery progress
  • MCP connection status
  • Schema fetching operations
  • Cache operations
  • Any errors encountered during extension operations

Common Issues

  • No resources appearing: Run the DSC: Clear Cache command from the Command Palette to force rediscovery
  • Extension not activating: Ensure you have a .dsc.config.yaml or .dsc.config.yml file open
  • Missing resources: Check that DSC is properly installed and available in your PATH by running dsc --version in a terminal

Questions, Issues, and Contributions

  • If you come across a problem with the extension, please file an issue
  • Contributions are always welcome and all feedbick is appreciated and welcome!
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft