Listing 1: Apps installieren # yaml-language-server: $schema=https://aka.ms/ configuration-dsc-schema/0.2 properties: assertions: - resource: Microsoft.Windows.Developer/OsVersion directives: description: Verify min Windows 11 24H2 allowPrerelease: true settings: MinVersion: '10.0.26100' resources: - resource: Environment id: vardev directives: description: Client Type Environment Variable (Developer) allowPrerelease: true settings: Ensure: Present Name: ClientType Value: Developer - resource: Microsoft.WinGet.DSC/ WinGetPackage dependsOn: - vardev id: winrar directives: description: Install WinRar from RarLabs settings: id: RARLab.WinRAR source: winget - resource: Microsoft.WinGet.DSC/ WinGetPackage dependsOn: - vardev id: vscode directives: description: Install Microsoft Visual Studio Code settings: id: Microsoft.VisualStudioCode source: winget configurationVersion: 0.2.0 Listing 2: Einen Windows-Server einrichten # yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2 properties: assertions: - resource: Microsoft.Windows.Developer/OsVersion directives: description: Verify min Windows Server 2025 allowPrerelease: true settings: MinVersion: '10.0.26100' - resource: PSDscResources/WindowsFeature directives: description: Verify Remote Desktop Server is installed allowPrerelease: true settings: Name: RDS-RD-Server Ensure: Present resources: - resource: xRobocopy/xRobocopy id: certfiles directives: description: Ensure all important certfiles are copied and present settings: Restartable: true SubdirectoriesIncludingEmpty: true Source: \\fr-dc-1\share\certfiles Destination: C:\temp\cert - resource: PSDscResources/WindowsFeature id: rdsgateway directives: description: Verify Remote Gateway is installed allowPrerelease: true settings: Name: RDS-Gateway Ensure: Present - resource: Microsoft.WinGet.DSC/WinGetPackage id: msteams directives: description: Install Microsoft Teams settings: id: Microsoft.Teams source: winget configurationVersion: 0.2.0 Listing 3: Konfigurationsdatei anpassen - resource: FileContentDSC/KeyValuePairFile id: configfileDomain directives: description: Adjust configuration file key-value pair allowPrerelease: true settings: Path: C:\Temp\cert\config\ configuration.txt Ensure: Present Name: SERVERDOMAIN Text: CONTOSO dependsOn: - certfiles Listing 4: Verschachteltes Konfigurationsmanagement properties: resources: - resource: Microsoft.WinGet.DSC/ WinGetPackage id: npm directives: description: Install Node securityContext: elevated settings: id: OpenJS.NodeJS source: winget - resource: NpmDsc/NpmPackage id: yarn dependsOn: - npm directives: description: Install Yarn allowPrerelease: true settings: Name: "yarn" Global: true PackageDirectory: '${WinGetConfigRoot}\..\' configurationVersion: 0.2.0