diff --git a/src/powershell-native/.gitignore b/src/powershell-native/.gitignore index d84d2f17a..07bd02f36 100644 --- a/src/powershell-native/.gitignore +++ b/src/powershell-native/.gitignore @@ -2,11 +2,9 @@ ALL_BUILD.vcxproj ALL_BUILD.vcxproj.filters CMakeCache.txt CMakeFiles/ -PowerShell.sln +*.sln Win32/ x64/ -ZERO_CHECK.vcxproj -ZERO_CHECK.vcxproj.filters cmake_install.cmake *.dir/ *.vcxproj diff --git a/test/powershell/engine/ExecutionPolicy.Tests.ps1 b/test/powershell/engine/ExecutionPolicy.Tests.ps1 index 266969563..f4ab41606 100644 --- a/test/powershell/engine/ExecutionPolicy.Tests.ps1 +++ b/test/powershell/engine/ExecutionPolicy.Tests.ps1 @@ -437,11 +437,11 @@ ZoneId=$FileType Context "Validate that 'Restricted' execution policy works on OneCore powershell" { BeforeAll { - Set-ExecutionPolicy Restricted -Force | Out-Null + Set-ExecutionPolicy Restricted -Force -Scope Process | Out-Null } AfterAll { - Set-ExecutionPolicy $originalExecutionPolicy -Force | Out-Null + Set-ExecutionPolicy $originalExecutionPolicy -Force -Scope Process | Out-Null } function Test-RestrictedExecutionPolicy @@ -507,11 +507,11 @@ ZoneId=$FileType Context "Validate that 'Unrestricted' execution policy works on OneCore powershell" { BeforeAll { - Set-ExecutionPolicy Unrestricted -Force | Out-Null + Set-ExecutionPolicy Unrestricted -Force -Scope Process | Out-Null } AfterAll { - Set-ExecutionPolicy $originalExecutionPolicy -Force | Out-Null + Set-ExecutionPolicy $originalExecutionPolicy -Force -Scope Process | Out-Null } function Test-UnrestrictedExecutionPolicy { @@ -553,11 +553,11 @@ ZoneId=$FileType Context "Validate that 'ByPass' execution policy works on OneCore powershell" { BeforeAll { - Set-ExecutionPolicy Bypass -Force | Out-Null + Set-ExecutionPolicy Bypass -Force -Scope Process | Out-Null } AfterAll { - Set-ExecutionPolicy $originalExecutionPolicy -Force | Out-Null + Set-ExecutionPolicy $originalExecutionPolicy -Force -Scope Process | Out-Null } function Test-ByPassExecutionPolicy { @@ -605,11 +605,11 @@ ZoneId=$FileType Context "'RemoteSigned' execution policy works on OneCore powershell" { BeforeAll { - Set-ExecutionPolicy RemoteSigned -Force | Out-Null + Set-ExecutionPolicy RemoteSigned -Force -Scope Process | Out-Null } AfterAll { - Set-ExecutionPolicy $originalExecutionPolicy -Force + Set-ExecutionPolicy $originalExecutionPolicy -Force -Scope Process } function Test-RemoteSignedExecutionPolicy { @@ -744,11 +744,11 @@ ZoneId=$FileType Context "Validate that 'AllSigned' execution policy works on OneCore powershell" { BeforeAll { - Set-ExecutionPolicy AllSigned -Force + Set-ExecutionPolicy AllSigned -Force -Scope Process } AfterAll { - Set-ExecutionPolicy $originalExecutionPolicy -Force + Set-ExecutionPolicy $originalExecutionPolicy -Force -Scope Process } function Test-AllSignedExecutionPolicy {