-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
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