### Install DSC using WinGet Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 These commands demonstrate how to search for and install the latest stable or preview versions of Desired State Configuration (DSC) on Windows using the winget package manager. It first searches for available DSC packages and then proceeds with the installation using the package ID. ```PowerShell winget search DesiredStateConfiguration --source msstore ``` ```PowerShell # Install latest stable winget install --id 9NVTPZWRC6KQ --source msstore ``` ```PowerShell # Install latest preview winget install --id 9PCX3HX4HZ0Z --source msstore ``` -------------------------------- ### DSC Resource Operations Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 DSC Resources define how to manage system or application component state. They describe a schema for manageable settings and support Get (retrieve current state) and Test (validate state) operations. Most resources also support the Set operation to enforce the desired state. ```APIDOC DSC Resource Operations: Get(instance): - Retrieves the current state of a resource instance. - Parameters: resource instance properties - Returns: current state properties Test(instance): - Validates if the resource instance is in the desired state. - Parameters: resource instance properties - Returns: boolean (true if in desired state, false otherwise) Set(instance): - Enforces the desired state for the resource instance. - Parameters: resource instance properties - Returns: None (or status of the operation) ``` -------------------------------- ### PowerShell Resources Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 Lists essential resources for PowerShell users, such as the VS Code Extension, PowerShell Gallery, and official blogs. ```powershell VS Code Extension PowerShell Gallery PowerShell Team blog PowerShell Community blog ``` -------------------------------- ### Download PowerShell Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 Provides a link to download the latest stable version of PowerShell. ```APIDOC GET /powershell-release Description: Downloads the latest stable version of PowerShell. Parameters: - tag: Specifies the release tag (e.g., 'stable') Returns: - PowerShell installer package. ``` -------------------------------- ### Microsoft DSC 3.0 Resources Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 Links to key resources for Microsoft DSC 3.0, including the overview, changelog, and glossary. ```powershell Microsoft DSC 3.0 Changelog Glossary ``` -------------------------------- ### PowerShell DSC Version Navigation Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 Provides links to different versions of PowerShell DSC, allowing users to access specific documentation for each version. ```powershell 3.0 2.0 1.1 ``` -------------------------------- ### PowerShell Navigation Links Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 Provides navigation links to various PowerShell resources, including DSC, PowerShellGet, utility modules, and the module browser. ```powershell Overview DSC PowerShellGet Utility modules Module Browser API Browser ``` -------------------------------- ### User Authentication and Navigation Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 Provides links for user sign-in, sign-out, profile, and settings management. ```APIDOC POST /users/sign-in Description: Signs a user into the system. Redirects to: /powershell/dsc/overview?view=dsc-3.0 POST /users/sign-out Description: Signs a user out of the system. Redirects to: /powershell/dsc/overview?view=dsc-3.0 GET /users/me/activity Description: Retrieves the user's activity feed. GET /users/me/settings Description: Retrieves the user's account settings. ``` -------------------------------- ### DSC Command Line Reference Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 This entry points to the command-line interface (CLI) reference for the 'dsc' command, which is essential for interacting with Desired State Configuration. It covers the various commands and options available for managing DSC configurations and resources. ```APIDOC DSC Command Line Reference: Details the usage and options for the 'dsc' command-line tool. URL: https://learn.microsoft.com/en-us/powershell/dsc/reference/cli/?view=dsc-3.0 ``` -------------------------------- ### PowerShell API Browser Link Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 A link to the PowerShell API Browser, which allows users to explore and discover PowerShell SDK APIs. ```powershell https://learn.microsoft.com/en-us/dotnet/api/?view=powershellsdk-7.4.0 ``` -------------------------------- ### Microsoft Applied Skills Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 A link to explore all Microsoft Applied Skills, designed to showcase real-world skills and help users stand out. ```APIDOC GET /credentials/applied-skills Description: Explore all Microsoft Applied Skills. Parameters: - wt.mc_id: Marketing identifier (appliedskills_marketingspot_webpage_wwl_learnpromo) Returns: - List of available Applied Skills certifications. ``` -------------------------------- ### Page Navigation and Editing Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 Provides links for navigating the table of contents, exiting editor mode, reading in English, adding to collections/plans, and editing the page. ```APIDOC GET /?view=dsc-3.0 Description: Main entry point for the DSC documentation. GET /powershell/?view=dsc-3.0 Description: Navigation link to the PowerShell section. GET /powershell/dsc/overview?view=dsc-3.0 Description: Link to read the current page in English. POST /collections/add Parameters: - item: Item to add to collections POST /plan/add Parameters: - item: Item to add to plan GET /github/edit Description: Link to edit the current page on GitHub. Path: - /MicrosoftDocs/PowerShell-Docs-DSC/blob/main/dsc/docs-conceptual/dsc-3.0/overview.md ``` -------------------------------- ### DSC Configuration Document Formats Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 DSC Configuration Documents define the desired state of a system and can be written in either JSON or YAML. These documents specify instances of resources and the state to enforce, supporting scenarios like application environment requirements and operational standards. ```JSON { "$schema": "https://schemas.microsoft.com/powershell/dsc/configuration.schema.json", "resources": [ { "type": "Microsoft.Windows/PSDesiredStateConfiguration", "properties": { "configuration": "MyConfiguration" } } ] } ``` ```YAML --- $schema: https://schemas.microsoft.com/powershell/dsc/configuration.schema.json resources: - type: Microsoft.Windows/PSDesiredStateConfiguration properties: configuration: MyConfiguration ... ``` -------------------------------- ### DSC Resource Manifests Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 Self-contained DSC resources define a resource manifest, which is typically a JSON or YAML file. This manifest specifies how DSC should invoke the resource and lists the properties the resource can manage. This replaces the MOF files used in older PowerShell DSC versions. ```JSON { "$schema": "https://schemas.microsoft.com/powershell/dsc/resourceManifest.schema.json", "name": "MyCustomResource", "version": "1.0.0", "description": "A custom DSC resource.", "accepts": [ { "version": "1.0.0", "operation": "Set", "input": { "type": "object", "properties": { "keyProperty": { "type": "string" }, "valueProperty": { "type": "integer" } }, "required": [ "keyProperty" ] } } ], "returns": [ { "version": "1.0.0", "operation": "Get", "output": { "type": "object", "properties": { "keyProperty": { "type": "string" }, "currentValue": { "type": "integer" } } } } ] } ``` -------------------------------- ### Social Media Sharing Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 Provides links for sharing content via Facebook, X.com (Twitter), and LinkedIn. ```APIDOC POST /share/facebook Parameters: - u: URL to share - WT.mc_id: Marketing identifier POST /share/twitter Parameters: - original_referer: Referrer URL - text: Tweet text - tw_p: Tweet button type - url: URL to share - WT.mc_id: Marketing identifier POST /share/linkedin Parameters: - shareActive: Boolean indicating if sharing is active - text: Text to include in the post - WT.mc_id: Marketing identifier ``` -------------------------------- ### Feedback and Authorization Note Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 Provides a feedback mechanism and a note regarding page access authorization. ```APIDOC POST /feedback Description: Submit feedback for the page. Note: Access to this page requires authorization. Options: - Sign in: /powershell/dsc/overview?view=dsc-3.0 - Change directories. ``` -------------------------------- ### DSC JSON Schema Reference Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 DSC utilizes JSON schemas to define the structure for resources, configuration documents, and output. This standardization facilitates integration with other tools by providing a clear interface definition. Refer to the official documentation for a comprehensive overview of these schemas. ```APIDOC DSC JSON Schema Reference Overview: Provides detailed information on the JSON schemas used by DSC for resources, configurations, and outputs. Enables standardized interfacing with DSC for external tools. URL: https://learn.microsoft.com/en-us/powershell/dsc/reference/schemas/overview?view=dsc-3.0 ``` -------------------------------- ### DSC Adapter Resources for PowerShell DSC Compatibility Source: https://learn.microsoft.com/en-us/powershell/dsc/?view=dsc-3.0/overview_view=dsc-3 DSC provides adapter resources to ensure compatibility with existing PowerShell Desired State Configuration (PSDSC) resources. The `Microsoft.DSC/PowerShell` adapter works with PowerShell class-based PSDSC resources, while `Microsoft.Windows/WindowsPowerShell` works with Windows PowerShell compatible PSDSC resources. ```APIDOC DSC Adapter Resources: Microsoft.DSC/PowerShell: - Description: Adapts PSDSC resources implemented as PowerShell classes. - Usage: Enables DSC to discover, validate, and invoke PSDSC resources in PowerShell. - Availability: Included in DSC install package for all platforms. Microsoft.Windows/WindowsPowerShell: - Description: Adapts PSDSC resources compatible with Windows PowerShell. - Usage: Enables DSC to discover, validate, and invoke PSDSC resources in Windows PowerShell. - Availability: Included in DSC install packages for Windows only. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.