Skip to content

Windows server 2025 - MDE check failing #13017

@NouwenSander

Description

@NouwenSander

Description

when building a local image the build fails when checking MDE.
multiple runs failed at this point for us.

==> windows-2025.azure-arm.image: Provisioning with powershell script: C:/a/1/drop/packer/BuildServers/images/windows/templates/../scripts/build/Post-Build-Validation.ps1
windows-2025.azure-arm.image: Test Microsoft Defender not set up using 'sc query sense'
==> windows-2025.azure-arm.image: C:\Windows\Temp\script-68c7e8f8-b9cc-343b-71f3-d072969d2cce.ps1 : MDE extension detected, MDE is more likely installed
windows-2025.azure-arm.image: Test Microsoft Defender not set up by checking for the MDE extension
==> windows-2025.azure-arm.image: on the system
==> windows-2025.azure-arm.image: At line:1 char:215
==> windows-2025.azure-arm.image: + ... 5b0c2b.ps1; &'c:/Windows/Temp/script-68c7e8f8-b9cc-343b-71f3-d072969d ...
==> windows-2025.azure-arm.image: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> windows-2025.azure-arm.image: + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
==> windows-2025.azure-arm.image: + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,script-68c7e8f8-b9cc-343b-71f3-d072969
==> windows-2025.azure-arm.image: d2cce.ps1
==> windows-2025.azure-arm.image:
==> windows-2025.azure-arm.image: Provisioning step had errors: Running the cleanup provisioner, if present...
==> windows-2025.azure-arm.image:
==> windows-2025.azure-arm.image: Deleting Virtual Machine deployment and its attached resources...

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • macOS 26 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Image version and build link

Windows server 2025

Is it regression?

No

Expected behavior

Build to complete.

Actual behavior

build fails with

==> windows-2025.azure-arm.image: Provisioning with powershell script: C:/a/1/drop/packer/BuildServers/images/windows/templates/../scripts/build/Post-Build-Validation.ps1
windows-2025.azure-arm.image: Test Microsoft Defender not set up using 'sc query sense'
==> windows-2025.azure-arm.image: C:\Windows\Temp\script-68c7e8f8-b9cc-343b-71f3-d072969d2cce.ps1 : MDE extension detected, MDE is more likely installed
windows-2025.azure-arm.image: Test Microsoft Defender not set up by checking for the MDE extension
==> windows-2025.azure-arm.image: on the system
==> windows-2025.azure-arm.image: At line:1 char:215
==> windows-2025.azure-arm.image: + ... 5b0c2b.ps1; &'c:/Windows/Temp/script-68c7e8f8-b9cc-343b-71f3-d072969d ...
==> windows-2025.azure-arm.image: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> windows-2025.azure-arm.image: + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
==> windows-2025.azure-arm.image: + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,script-68c7e8f8-b9cc-343b-71f3-d072969
==> windows-2025.azure-arm.image: d2cce.ps1
==> windows-2025.azure-arm.image:
==> windows-2025.azure-arm.image: Provisioning step had errors: Running the cleanup provisioner, if present...
==> windows-2025.azure-arm.image:
==> windows-2025.azure-arm.image: Deleting Virtual Machine deployment and its attached resources...

Repro steps

packer build

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions