File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,20 @@ dsc resource get -r Microsoft/osinfo
84
84
- WindowsPowerShell
85
85
- PowerShell 7
86
86
87
+ Winget example
88
+
87
89
### WMI Adapter
88
90
89
91
### Include Resource
90
92
91
93
### Parameters
92
94
95
+ - Winget
96
+
97
+ ``` powershell
98
+ dsc config -p '{"parameters":{"ensureCalc":"Absent"}}' set -p .\dsc\examples\winget.dsc.yaml
99
+ ```
100
+
93
101
- Secure paramters
94
102
95
103
### Metadata
Original file line number Diff line number Diff line change
1
+ # The `Microsoft.Winget.DSC` resources needs to be installed: install-psresource Microsoft.Winget.DSC -Prerelease
2
+
3
+ $schema : https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
4
+ parameters :
5
+ ensureCalc :
6
+ type : string
7
+ defaultValue : Present
8
+ allowedValues :
9
+ - Present
10
+ - Absent
11
+ resources :
12
+ - name : Use class PowerShell resources
13
+ type : Microsoft.DSC/PowerShell
14
+ properties :
15
+ resources :
16
+ - name : PowerShell 7 Preview
17
+ type : Microsoft.WinGet.DSC/WinGetPackage
18
+ properties :
19
+ Id : Microsoft.PowerShell.Preview
20
+ - name : Calc
21
+ type : Microsoft.WinGet.DSC/WinGetPackage
22
+ properties :
23
+ Id : Microsoft.WindowsCalculator_8wekyb3d8bbwe
24
+ Ensure : " [parameters('ensureCalc')]"
You can’t perform that action at this time.
0 commit comments