Skip to content

Get Started - Manage a Configuration Example Mismatch #389

Description

Type of issue

Other (describe below)

Feedback

This block of text:

The WindowsPowerShell adapter instance defines a single property, resources, as an array of resource instances. In this configuration, it defines two instances:

  • The first instance uses the PSRepository PSDSC resource from the PowerShellGet module to make sure the PowerShell Gallery is available for use as a repository.
  • The second instance uses the PSModule PSDSC resource from the same module to make sure that the Microsoft.WinGet.Client module is installed.

Does not appear to make sense when considering the example DSC config yaml in the doc:

$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Example registry key 
  type: Microsoft.Windows/Registry
  properties:
    keyPath: HKCU\dsc\example\key
    _exist:  true
- name: PSDSC resources
  type: Microsoft.Windows/WindowsPowerShell
  properties:
    resources:
    - name: DSC_EXAMPLE env variable
      type: PSDesiredStateConfiguration/Environment
      properties:
        Name: DSC_EXAMPLE
        Ensure: Present
        Value: Set by DSC

If I'm reading the config example correctly, we're merely checking for an environment variable, not for PowerShell Gallery repository installation and WinGet module installation.

Page URL

https://learn.microsoft.com/en-us/powershell/dsc/get-started/?view=dsc-3.0#manage-a-configuration

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs-DSC/blob/main/dsc/docs-conceptual/dsc-3.0/get-started/index.md

Author

Mikey Lombardi (He/Him) (@michaeltlombardi)

Platform Id

16be9b95-e417-1e14-0c49-e3953ba769f0

Document Id

6792ac36-4b04-6f1d-056b-0bfc8c89c8ab

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions