From 0e9d5807d626104ad6a048d886e2d2417b8dba76 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Sat, 8 Apr 2023 22:13:50 +0200 Subject: [PATCH] debug update powershell.config.json --- .github/workflows/golang-test-windows.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/golang-test-windows.yml b/.github/workflows/golang-test-windows.yml index 900d3a30c..6748a2ef1 100644 --- a/.github/workflows/golang-test-windows.yml +++ b/.github/workflows/golang-test-windows.yml @@ -50,10 +50,22 @@ jobs: # - name: Build helper # run: go test -c -o ${{ github.workspace }}/iface-testing.bin.exe ./iface/ # "C:\hostedtoolcache\windows\go\1.19.7\x64\bin\go.exe" + - name: custom config + if: ${{ always() }} + run: | + $ConfigPath = "$PSHOME\powershell.config.json" + $ConfigJSON = ConvertTo-Json -InputObject @{ + "Microsoft.PowerShell:ExecutionPolicy": "RemoteSigned", + "WindowsPowerShellCompatibilityModuleDenyList": [ + "BestPractices", + "UpdateServices" + ] + } + $ConfigJSON | Out-File -Force $ConfigPath + - name: Test if: ${{ always() }} run: | - rm "$PSHOME\powershell.config.json" Import-Module PSScheduledJob -UseWindowsPowerShell Import-Module ".\Invoke-ScheduledTask.ps1" Import-Module ".\Invoke-CommandAs.ps1"