You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -102,9 +99,9 @@ The components of this file consist of:
102
99
103
100
3. **Assertions**: List the preconditions (or prerequisites) required for this configuration in this section.
104
101
105
-
4. **Resource**: Both the "Assertions" and "Resources" list sections consist of individual `resource` nodes to represent the set up task. The `resource` should be given a name to represent the set up task that it will accomplish. Each resource must include **directives** and **settings**. Optionally, it can also include an **id** value.
102
+
4. **Resource**: Both the "Assertions" and "Resources" list sections consist of individual `resource` nodes to represent the set up task. The `resource` should be given the name of the PowerShell module followed by the name of the module's DSC resource that will be invoked to apply your desired state: `{ModuleName}/{DscResource}`. Each resource must include **directives** and **settings**. Optionally, it can also include an **id** value. When applying a configuration, WinGet will know to install the module from the [PowerShell Gallery](https://www.powershellgallery.com/packages) and invoke the specified [DSC resource](/powershell/dsc/concepts/resources).
106
103
107
-
5. **Directives**: The `directives` value of a resource must include a **module** value, representing the PowerShell module containing the [DSC Resources](/powershell/dsc/concepts/resources) that should be applied to accomplish the desired state configuration task. The `directives` should also include a `description` value to describe the configuration task being accomplished by the module. The `allowPrerelease` value enables you to choose whether or not the configuration will be allowed (`true`) to use "Prerelease" modules from the [PowerShell Gallery](https://www.powershellgallery.com/packages).
104
+
5. **Directives**: The `directives` section provides information about the module and the resource. This section should include a `description` value to describe the configuration task being accomplished by the module. The `allowPrerelease` value enables you to choose whether or not the configuration will be allowed (`true`) to use "Prerelease" modules from the [PowerShell Gallery](https://www.powershellgallery.com/packages).
108
105
109
106
6. **Settings**: The `settings` value of a resource represents the collection of name-value pairs being passed to the PowerShell DSC Resource. Settings could represent anything from whether Developer Mode is enabled, to applying a reg key, or to establishing a particular network setting.
110
107
@@ -122,6 +119,9 @@ There are multiple approaches to consider when determining how to organize the R
122
119
123
120
We recommend including a README.md file with any Open Source published WinGet Configuration file that includes the organizational approach of the file structure.
124
121
122
+
## Using the variable ${WinGetConfigRoot}
123
+
Certain DSC resources may take in a parameter that specifies the path of a file. Instead of specifying the full path, you can use the variable `${WinGetConfigRoot}` to define the working directory where the [`winget configure` command](../winget/configure.md) is being executed and append the relative path to point to that file. This is useful for generalizing a configuration file so that it is machine agnostic. The `Microsoft.VisualStudio.DSC/VSComponents` resource in the example above showcases this functionality by utilizing the `${WinGetConfigRoot}` to point to a .vsconfig file in a project's root directory. This also means that the user should ensure that the target file exists at the relative path based on the current working directory before executing the [`winget configure` command](../winget/configure.md).
124
+
125
125
## Where to find PowerShell DSC Resource modules
126
126
127
127
Check out the list of ready-to-use ("inbox") [PowerShell Desired State Configuration Resources](/powershell/dsc/reference/psdscresources/overview#resources) that are supported by Microsoft, including:
0 commit comments