Execution Prerequisite: Using winget in a Windows Environment

PowerShellカテゴリを表すパンダのイラスト PowerShell

Microsoft has announced the General Availability (GA) of Desired State Configuration (DSC) v3.2.0. This article outlines key updates based on official information, including new Windows resources, Bicep integration, version pinning, and expression language extensions.

This article is a technical explanation and implementation example generated using AI. While the provided code and procedures are based on primary sources, they have not been verified on actual hardware by the author. Behavior may vary depending on the environment and version.

Objective

The objective is to summarize the new features and improvements in Microsoft Desired State Configuration (DSC) v3.2.0, providing an overview of each feature described in official documentation and highlighting key points for usage.

Prerequisites and Notes

  • This article is an explanation based on primary information and is in a pre-verification state (prior to actual hardware testing).

  • Certain features (such as OptionalFeatureList and FeatureOnDemandList) are documented as requiring the use of ZIP packages.

  • Features such as Bicep integration via gRPC are provided as experimental capabilities.

Key New Features and Components in DSC v3.2.0

DSC v3.2.0 introduces a wide range of enhancements reflecting real-world usage, partner feedback, and community contributions.

New Windows Resources

The added built-in Windows resources expand the scope of management without requiring additional installations. The primary sources list the following resources.

  • Microsoft.Windows/Service: Management of Windows services

  • Microsoft.Windows/OptionalFeatureList: Management of optional Windows features (requires ZIP package)

  • Microsoft.Windows/FeatureOnDemandList: Management of features on demand in Windows (requires ZIP package)

  • Microsoft.Windows/FirewallRuleList: Management of Windows Firewall rules

  • Microsoft.OpenSSH.SSHD/sshd_config: Management of overall SSH server configuration

  • Microsoft.OpenSSH.SSHD/Subsystem and Microsoft.OpenSSH.SSHD/SubsystemList: Management of SSH server configuration for subsystem entries

  • Microsoft.OpenSSH.SSHD/Windows: Managing Windows SSH server settings such as the default shell

flowchart TD
    DSC[DSC v3.2.0 Core] --> WinRes[Windows Resources]
    DSC --> Bicep[Bicep Integration via gRPC]
    DSC --> Ext[Extensions: Import & Secret]
    WinRes --> Service[Microsoft.Windows/Service]
    WinRes --> Firewall[Microsoft.Windows/FirewallRuleList]
    WinRes --> SSH[Microsoft.OpenSSH.SSHD/Windows]
    Bicep --> Extension[dsc-bicep-ext]
    Ext --> Import[File Import]
    Ext --> Secret[Secret Retrieval]

Bicep integration and gRPC (Experimental)

A gRPC server has been introduced, enabling Bicep to directly orchestrate DSC resources without going through ARM.dsc-bicep-extExtensions are included in the MSIX package and exposed to the PATH.

Enhanced WhatIf support

dsc resource setCommands now include --what-if to preview changes for individual resources before applying them. Additionally, declaring whatIfReturns in the resource manifest enables more detailed preview output.

Version Pinning

Support has been added for pinning configuration documents to a specific DSC version, as well as pinning resource instances within a configuration to a designated version.version directives and requireVersion fields are used for this purpose.

Expression language improvements

Lambda expressions using ARM syntax for map() and filter(), dataUri() and dataUriToString() functions, and the use of reference() within copy loops are now supported, enhancing the expressiveness of configuration documents.

Extensions and adapters improvements

As new extensions, an "import" feature to convert arbitrary files into DSC configuration documents and a "secret" feature to retrieve secrets at runtime have been added. Additionally, support for adaptive resource manifests for PowerShell adapters andWrite-* automated trace conversion using cmdlets have also been implemented.

Verification Method

The primary source introduces how to search for and install DSC from the Microsoft Store in a Windows environment using winget.

Examples of commands outlining the save name, execution prerequisites, and expected verification details are provided below.

# 実行前提: Windows環境でのwinget利用


# 確認内容: DesiredStateConfigurationのパッケージIDとバージョンの確認

winget search DesiredStateConfiguration --source msstore

Limitations

  • All content covered in this article is based on publicly available information from the official blog and does not indicate operational results or performance metrics in a physical environment.

  • Some features and extensions are experimental and may be subject to specification changes in future releases.

Conclusion

  • DSC v3.2.0 introduces numerous features, including expanded Windows resources, Bicep integration, version pinning, and expression language extensions.

  • Points to verify prior to execution include the package format to be used (Store version or ZIP version) and the status of experimental features.

  • For detailed specifications and the latest patch information, please refer to the official documentation and repository.

References

  • Source Title: Announcing Microsoft Desired State Configuration v3.2.0

  • URL: https://devblogs.microsoft.com/powershell/announcing-dsc-v3-2-0/

Document information

Article title
Execution Prerequisite: Using winget in a Windows Environment
Published
Updated
Source
https://papanda925.com/?p=17894&lang=en

License: Text and original figures for which this site holds the relevant rights are available under CC BY 4.0 , unless otherwise noted. This article may include content created or edited with generative AI. If code has a separate license notice or a linked GitHub repository license, that license takes precedence for the code. Quotations, third-party materials, images, and trademarks are excluded from this license. Usage policy

Copied title and URL