Skip to content

Commit e2a9461

Browse files
authored
Add ARG example to DSC>MC migration
1 parent 2df5e8a commit e2a9461

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

articles/governance/machine-configuration/whats-new/migrating-from-dsc-extension.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,28 @@ in the Azure Portal open “Virtual machines”, select the name of each virtual
2727
“Settings” in the table of contents, and finally “Extensions + Applications”.
2828
There you will see a list of extensions assigned.
2929

30+
The following query will return a list of virtual machines in Azure with the
31+
DSC extension (for Windows) attached.
32+
33+
```Kusto
34+
resources
35+
| where type == 'microsoft.compute/virtualmachines'
36+
| extend
37+
JoinID = toupper(id),
38+
OSName = tostring(properties.osProfile.computerName),
39+
OSType = tostring(properties.storageProfile.osDisk.osType)
40+
| join kind=inner(
41+
resources
42+
| where type == 'microsoft.compute/virtualmachines/extensions'
43+
| extend
44+
VMId = toupper(substring(id, 0, indexof(id, '/extensions'))),
45+
ExtensionName = tolower(name)
46+
| where ExtensionName == 'microsoft.powershell.dsc'
47+
) on $left.JoinID == $right.VMId
48+
| project OSName, OSType, ExtensionName, ['id']
49+
| order by tolower(OSName) asc
50+
```
51+
3052
## Major differences
3153

3254
Machine configuration uses DSC version 2. DSC Extension uses

0 commit comments

Comments
 (0)