diff --git a/test/powershell/Language/Scripting/NativeExecution/NativeUnixGlobbing.Tests.ps1 b/test/powershell/Language/Scripting/NativeExecution/NativeUnixGlobbing.Tests.ps1 index 5176056fe5..0d728b717d 100644 --- a/test/powershell/Language/Scripting/NativeExecution/NativeUnixGlobbing.Tests.ps1 +++ b/test/powershell/Language/Scripting/NativeExecution/NativeUnixGlobbing.Tests.ps1 @@ -120,11 +120,11 @@ Describe 'Native UNIX globbing tests' -tags "CI" { } # Test ~ expansion It 'Tilde should be replaced by the filesystem provider home directory' { - /bin/echo ~ | Should -BeExactly ($executioncontext.SessionState.Provider.Get("FileSystem").Home) + /bin/echo ~ | Should -BeExactly ($ExecutionContext.SessionState.Provider.Get("FileSystem").Home) } # Test ~ expansion with a path fragment (e.g. ~/foo) It '~/foo should be replaced by the /foo' { - /bin/echo ~/foo | Should -BeExactly "$($executioncontext.SessionState.Provider.Get("FileSystem").Home)/foo" + /bin/echo ~/foo | Should -BeExactly "$($ExecutionContext.SessionState.Provider.Get("FileSystem").Home)/foo" } It '~ should not be replaced when quoted' { /bin/echo '~' | Should -BeExactly '~' diff --git a/test/powershell/Modules/Microsoft.PowerShell.Security/CmsMessage.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Security/CmsMessage.Tests.ps1 index 62dc82c0cd..725c936f50 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Security/CmsMessage.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Security/CmsMessage.Tests.ps1 @@ -161,7 +161,7 @@ Describe "CmsMessage cmdlets thorough tests" -Tags "Feature" { $errors = $null $recipient = [System.Management.Automation.CmsMessageRecipient] $protectedEventLoggingCertPath - $recipient.Resolve($executionContext.SessionState, "Decryption", [ref] $errors) + $recipient.Resolve($ExecutionContext.SessionState, "Decryption", [ref] $errors) $recipient.Certificates.Count | Should -Be 1 } diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Implicit.Remoting.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Implicit.Remoting.Tests.ps1 index 3280b11936..3ddc835fca 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Implicit.Remoting.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Implicit.Remoting.Tests.ps1 @@ -1860,11 +1860,11 @@ try } It "Removing a module should clean-up event handlers (Windows 7: #268819)" { - $oldNumberOfHandlers = $executionContext.GetType().GetProperty("Events").GetValue($executionContext, $null).Subscribers.Count + $oldNumberOfHandlers = $ExecutionContext.GetType().GetProperty("Events").GetValue($ExecutionContext, $null).Subscribers.Count $module = Import-PSSession -Session $session -Name Get-Random -AllowClobber Remove-Module $module -Force - $newNumberOfHandlers = $executionContext.GetType().GetProperty("Events").GetValue($executionContext, $null).Subscribers.Count + $newNumberOfHandlers = $ExecutionContext.GetType().GetProperty("Events").GetValue($ExecutionContext, $null).Subscribers.Count ## Event should be unregistered when the module is removed $oldNumberOfHandlers | Should -Be $newNumberOfHandlers