From ae930f132c4bee495bd81eb75ec4fd7be6f1e812 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Tue, 19 Oct 2021 12:58:41 +0300 Subject: [PATCH] win2019: enable use of test-signed code (#4296) --- images/win/scripts/Tests/WindowsFeatures.Tests.ps1 | 2 +- images/win/windows2019.json | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 b/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 index 9f0684ba..f2a591ac 100644 --- a/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 +++ b/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 @@ -51,7 +51,7 @@ Describe "GDIProcessHandleQuota" { } } -Describe "Test Signed Drivers" -Skip:(-not (Test-IsWin22)) { +Describe "Test Signed Drivers" -Skip:(Test-IsWin16) { It "bcdedit testsigning should be Yes"{ "$(bcdedit)" | Should -Match "testsigning\s+Yes" } diff --git a/images/win/windows2019.json b/images/win/windows2019.json index 7c16c7c7..5a0dfcf4 100644 --- a/images/win/windows2019.json +++ b/images/win/windows2019.json @@ -110,6 +110,14 @@ "if (-not ((net localgroup Administrators) -contains '{{user `install_user`}}')) { exit 1 }" ] }, + { + "type": "powershell", + "inline": [ + "bcdedit.exe /set TESTSIGNING ON" + ], + "elevated_user": "{{user `install_user`}}", + "elevated_password": "{{user `install_password`}}" + }, { "type": "powershell", "environment_vars": [