Skip to content

Commit 2cee56a

Browse files
committed
Set bypass executionpolicy when calling PowerShell
1 parent d769405 commit 2cee56a

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

powershell-adapter/powershell.dsc.resource.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"-NoLogo",
1515
"-NonInteractive",
1616
"-NoProfile",
17+
"-ExecutionPolicy",
18+
"Bypass",
1719
"-Command",
1820
"./psDscAdapter/powershell.resource.ps1 List"
1921
]
@@ -26,6 +28,8 @@
2628
"-NoLogo",
2729
"-NonInteractive",
2830
"-NoProfile",
31+
"-ExecutionPolicy",
32+
"Bypass",
2933
"-Command",
3034
"$Input | ./psDscAdapter/powershell.resource.ps1 Get"
3135
],
@@ -37,6 +41,8 @@
3741
"-NoLogo",
3842
"-NonInteractive",
3943
"-NoProfile",
44+
"-ExecutionPolicy",
45+
"Bypass",
4046
"-Command",
4147
"$Input | ./psDscAdapter/powershell.resource.ps1 Set"
4248
],
@@ -50,6 +56,8 @@
5056
"-NoLogo",
5157
"-NonInteractive",
5258
"-NoProfile",
59+
"-ExecutionPolicy",
60+
"Bypass",
5361
"-Command",
5462
"$Input | ./psDscAdapter/powershell.resource.ps1 Test"
5563
],
@@ -62,6 +70,8 @@
6270
"-NoLogo",
6371
"-NonInteractive",
6472
"-NoProfile",
73+
"-ExecutionPolicy",
74+
"Bypass",
6575
"-Command",
6676
"$Input | ./psDscAdapter/powershell.resource.ps1 Export"
6777
],
@@ -74,6 +84,8 @@
7484
"-NoLogo",
7585
"-NonInteractive",
7686
"-NoProfile",
87+
"-ExecutionPolicy",
88+
"Bypass",
7789
"-Command",
7890
"$Input | ./psDscAdapter/powershell.resource.ps1 Validate"
7991
],

powershell-adapter/windowspowershell.dsc.resource.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"-NoLogo",
1515
"-NonInteractive",
1616
"-NoProfile",
17+
"-ExecutionPolicy",
18+
"Bypass",
1719
"-Command",
1820
"./psDscAdapter/powershell.resource.ps1 List"
1921
]
@@ -26,6 +28,8 @@
2628
"-NoLogo",
2729
"-NonInteractive",
2830
"-NoProfile",
31+
"-ExecutionPolicy",
32+
"Bypass",
2933
"-Command",
3034
"$Input | ./psDscAdapter/powershell.resource.ps1 Get"
3135
],
@@ -37,6 +41,8 @@
3741
"-NoLogo",
3842
"-NonInteractive",
3943
"-NoProfile",
44+
"-ExecutionPolicy",
45+
"Bypass",
4046
"-Command",
4147
"$Input | ./psDscAdapter/powershell.resource.ps1 Set"
4248
],
@@ -50,6 +56,8 @@
5056
"-NoLogo",
5157
"-NonInteractive",
5258
"-NoProfile",
59+
"-ExecutionPolicy",
60+
"Bypass",
5361
"-Command",
5462
"$Input | ./psDscAdapter/powershell.resource.ps1 Test"
5563
],
@@ -62,6 +70,8 @@
6270
"-NoLogo",
6371
"-NonInteractive",
6472
"-NoProfile",
73+
"-ExecutionPolicy",
74+
"Bypass",
6575
"-Command",
6676
"$Input | ./psDscAdapter/powershell.resource.ps1 Validate"
6777
]

0 commit comments

Comments
 (0)