From af3ba77937c4aeb53e6f1889af45af63308f0203 Mon Sep 17 00:00:00 2001 From: Marco Mansi Date: Thu, 26 Mar 2020 16:20:08 +0100 Subject: [PATCH] Revert "Removed Set-ExecutionPolicy RemoteSigned from Install-ServiceFabricSDK.ps1" This reverts commit 70c2ad2317d435fb2db72b6689540c7608d9096b. --- images/win/Windows2016-Azure.json | 3 ++- images/win/Windows2019-Azure.json | 3 ++- images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index e0bf37f5..993e1b18 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -238,7 +238,8 @@ "type": "powershell", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1" - ] + ], + "execution_policy": "remotesigned" }, { "type": "windows-restart", diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 3ebbea24..4bae8579 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -219,7 +219,8 @@ "type": "powershell", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1" - ] + ], + "execution_policy": "remotesigned" }, { "type": "windows-restart", diff --git a/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 b/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 index b8e264a0..25a0429d 100644 --- a/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 +++ b/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 @@ -8,4 +8,6 @@ $temp_install_dir = 'C:\Windows\Installer' New-Item -Path $temp_install_dir -ItemType Directory -Force +Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force + WebpiCmd.exe /Install /Products:MicrosoftAzure-ServiceFabric-CoreSDK /AcceptEula /XML:https://webpifeed.blob.core.windows.net/webpifeed/5.1/WebProductList.xml