diff --git a/test/powershell/Modules/Microsoft.PowerShell.Security/ExecutionPolicy.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Security/ExecutionPolicy.Tests.ps1 index 5a73055d41..9bcc0143d3 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Security/ExecutionPolicy.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Security/ExecutionPolicy.Tests.ps1 @@ -67,9 +67,6 @@ try { Set-ExecutionPolicy -ExecutionPolicy Restricted -Force -ErrorAction Stop (Get-Help -Name Get-Disk -ErrorAction Stop).Name | Should -Be 'Get-Disk' } - catch { - $_.ToString | Should -Be null - } finally { Set-ExecutionPolicy $currentExecutionPolicy -Force @@ -532,10 +529,10 @@ ZoneId=$FileType Context "Prereq: Validate that 'Microsoft.PowerShell.Archive' is signed" { It "'Microsoft.PowerShell.Archive' should have a signature" { - $script:archiveAllCert | Should -Not -Be null + $script:archiveAllCert | Should -Not -Be $null } It "'Microsoft.PowerShell.Archive' should have a valid signature" { - $script:archiveCert | Should -Not -Be null + $script:archiveCert | Should -Not -Be $null } }