Skip to content

Microsoft.DSC metadata version doesn't return prerelease versions #1065

@Gijsreyn

Description

@Gijsreyn

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Summary

Whenever running a configuration document, the version number in the Microsoft.DSC metadata field is only x.x.x. According to the documentation, it should follow proper semantic versioning: https://github.com/MicrosoftDocs/PowerShell-Docs-DSC/blob/main/dsc/docs-conceptual/dsc-3.0/reference/schemas/metadata/Microsoft.DSC/properties.md#version

Steps to reproduce

Run a simple configuration document e.g.

$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Case Demo
  type: Microsoft.DSC.Debug/Echo
  properties:
    output:
      appleLower: "[indexOf(createArray('Apple','Banana'), 'apple')]"

Expected behavior

When running a prerelease version (for example v3.2.0-preview.4), I would expect:

metadata:                                                                                                                                                                                                 
  Microsoft.DSC:
    version: 3.2.0-preview.4
    operation: get
    executionType: actual
    startDatetime: 2025-08-20T12:05:14.882982200+02:00
    endDatetime: 2025-08-20T12:05:19.865685200+02:00
    duration: PT4.982703S
    securityContext: restricted
results:
- metadata:
    Microsoft.DSC:
      duration: PT0.2270801S
  name: Case Demo
  type: Microsoft.DSC.Debug/Echo
  result:
    actualState:
      output:
        appleLower: -1

Actual behavior

metadata:                                                                                                                                                                                                 
  Microsoft.DSC:
    version: 3.2.0
    operation: get
    executionType: actual
    startDatetime: 2025-08-20T12:05:14.882982200+02:00
    endDatetime: 2025-08-20T12:05:19.865685200+02:00
    duration: PT4.982703S
    securityContext: restricted
results:
- metadata:
    Microsoft.DSC:
      duration: PT0.2270801S
  name: Case Demo
  type: Microsoft.DSC.Debug/Echo
  result:
    actualState:
      output:
        appleLower: -1

Error details

Environment data

Name                           Value
----                           -----
PSVersion                      7.5.2
PSEdition                      Core
GitCommitId                    7.5.2
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

dsc 3.2.0-preview.4

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions