Skip to content

Commit 05fa2dd

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
add wmi example
1 parent 20af561 commit 05fa2dd

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

dsc/examples/PSConfEU_2024_Demo.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dsc resource list
1515
```powershell
1616
dsc resource list --adapter Microsoft.DSC/PowerShell
1717
dsc resource list --adapter Microsoft.Windows/PowerShell
18+
dsc resource list --adapter Microsoft.Windows/WMI *computer*
1819
```
1920

2021
- Find DSC resources
@@ -99,6 +100,10 @@ Winget example
99100

100101
### WMI Adapter
101102

103+
```powershell
104+
dsc resource get -r root.cimv2/Win32_ComputerSystem
105+
```
106+
102107
### Include Resource
103108

104109
### Parameters

dsc/examples/wmi.dsc.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
2+
resources:
3+
- name: WMI
4+
type: Microsoft.Windows/WMI
5+
properties:
6+
resources:
7+
- name: computer system
8+
type: root.cimv2/Win32_ComputerSystem
9+
properties:
10+
- name: network adapter
11+
type: root.cimv2/Win32_NetworkAdapter
12+
properties:

0 commit comments

Comments
 (0)