Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example configs for winget and wmi #453

Merged
merged 15 commits into from
Jul 3, 2024
4 changes: 4 additions & 0 deletions dsc/examples/osinfo_parameters.dsc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ resources:
type: Microsoft/OSInfo
properties:
family: macOS
- name: path
type: Test/Echo
properties:
output: "[envvar('PATH')]"
24 changes: 24 additions & 0 deletions dsc/examples/winget.dsc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# The `Microsoft.Winget.DSC` resources needs to be installed: install-psresource Microsoft.Winget.DSC -Prerelease

$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
parameters:
ensureCalc:
type: string
defaultValue: Present
allowedValues:
- Present
- Absent
resources:
- name: Use class PowerShell resources
type: Microsoft.DSC/PowerShell
properties:
resources:
- name: PowerShell 7 Preview
type: Microsoft.WinGet.DSC/WinGetPackage
properties:
Id: Microsoft.PowerShell.Preview
- name: Calc from Windows Store
type: Microsoft.WinGet.DSC/WinGetPackage
properties:
Id: "9WZDNCRFHVN5"
Ensure: "[parameters('ensureCalc')]"
12 changes: 12 additions & 0 deletions dsc/examples/wmi.dsc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
resources:
- name: WMI
type: Microsoft.Windows/WMI
properties:
resources:
- name: computer system
type: root.cimv2/Win32_ComputerSystem
properties:
SteveL-MSFT marked this conversation as resolved.
Show resolved Hide resolved
- name: network adapter
type: root.cimv2/Win32_NetworkAdapter
properties:
2 changes: 1 addition & 1 deletion wmi-adapter/copy_files.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
wmi.resource.ps1
wmi.dsc.resource.json.optout
wmi.dsc.resource.json
Loading