File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 12
12
# limitations under the License.
13
13
# ----------------------------------------------------------------------------------
14
14
15
- Get-ExecutionPolicy - List | Where-Object {$_.ExecutionPolicy -eq " Restricted" } |
16
- % {
17
- try
18
- {
19
- Set-ExecutionPolicy - Scope $_.Scope - ExecutionPolicy RemoteSigned - Force - ErrorAction " SilentlyContinue"
20
- }
21
- catch
22
- {
23
- # do not fail if execution policy cannot be set for this scope
24
- }
15
+
16
+ try
17
+ {
18
+ Set-ExecutionPolicy - ExecutionPolicy RemoteSigned - Force - ErrorAction " SilentlyContinue"
19
+ }
20
+ catch
21
+ {
22
+ # do not fail if execution policy cannot be set for this scope
25
23
}
24
+
Original file line number Diff line number Diff line change 123
123
<CustomAction Id =" UpdatePSShortcut" BinaryKey =" CustomActions" DllEntry =" UpdatePSShortcut" Execute =" deferred" Impersonate =" no" />
124
124
<CustomAction Id =" SetCustomActionDataValue" Return =" check" Property =" UpdatePSShortcut"
125
125
Value =" ShortcutPath=[AzureSdkMenu]Microsoft Azure PowerShell.lnk;DefaultShortcutPath=[ProgramMenuFolder]System Tools\Windows PowerShell.lnk" />
126
- <CustomAction Id =" SetExecutionPolicy" Property =" POWERSHELLEXE" ExeCommand =" -NoLogo -NoProfile -ExecutionPolicy Bypass -Command " .\ " [PowerShellFolder]\ SetExecutionPolicy.ps1"" " Execute =" deferred" Impersonate =" no" Return =" check" />
126
+ <CustomAction Id =" SetExecutionPolicy" Property =" POWERSHELLEXE" ExeCommand =" -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "" [PowerShellFolder]SetExecutionPolicy.ps1"" " Execute =" deferred" Impersonate =" no" Return =" check" />
127
127
128
128
<InstallExecuteSequence >
129
129
<Custom Action =" SetCustomActionDataValue" After =" CreateShortcuts" >NOT Installed</Custom >
You can’t perform that action at this time.
0 commit comments