Skip to content

Commit 82295d4

Browse files
authored
Merge pull request #715 from SteveL-MSFT/executionpolicy
Set bypass executionpolicy when calling PowerShell
2 parents 1911662 + e7600be commit 82295d4

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
],
@@ -49,6 +55,8 @@
4955
"-NoLogo",
5056
"-NonInteractive",
5157
"-NoProfile",
58+
"-ExecutionPolicy",
59+
"Bypass",
5260
"-Command",
5361
"$Input | ./psDscAdapter/powershell.resource.ps1 Test"
5462
],
@@ -61,6 +69,8 @@
6169
"-NoLogo",
6270
"-NonInteractive",
6371
"-NoProfile",
72+
"-ExecutionPolicy",
73+
"Bypass",
6474
"-Command",
6575
"$Input | ./psDscAdapter/powershell.resource.ps1 Export"
6676
],
@@ -73,6 +83,8 @@
7383
"-NoLogo",
7484
"-NonInteractive",
7585
"-NoProfile",
86+
"-ExecutionPolicy",
87+
"Bypass",
7688
"-Command",
7789
"$Input | ./psDscAdapter/powershell.resource.ps1 Validate"
7890
],

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
],
@@ -49,6 +55,8 @@
4955
"-NoLogo",
5056
"-NonInteractive",
5157
"-NoProfile",
58+
"-ExecutionPolicy",
59+
"Bypass",
5260
"-Command",
5361
"$Input | ./psDscAdapter/powershell.resource.ps1 Test"
5462
],
@@ -61,6 +69,8 @@
6169
"-NoLogo",
6270
"-NonInteractive",
6371
"-NoProfile",
72+
"-ExecutionPolicy",
73+
"Bypass",
6474
"-Command",
6575
"$Input | ./psDscAdapter/powershell.resource.ps1 Validate"
6676
]

0 commit comments

Comments
 (0)