From aa764dd54edd5b214eb1fcb67aba5370014e7663 Mon Sep 17 00:00:00 2001 From: Ilya Date: Sat, 11 Feb 2017 01:39:34 +0400 Subject: [PATCH] Small typo in archive cmdlets tests (#3121) * Small typo in archive cmdlets tests * Add -ErrorAction SilentlyContinue --- .../Pester.Commands.Cmdlets.Archive.Tests.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 index 2615c0323..6cb22c642 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Archive/Pester.Commands.Cmdlets.Archive.Tests.ps1 @@ -12,9 +12,8 @@ Describe "Test suite for Microsoft.PowerShell.Archive module" -Tags "CI" { } BeforeAll { # remove the archive module forcefully, to be sure we get the correct version - if ( Get-Module Microsoft.PowerShell.Archive. ) { - Remove-Module Microsoft.PowerShell.Archive -force - } + Remove-Module Microsoft.PowerShell.Archive -Force -ErrorAction SilentlyContinue + # Version comparisons should use a System.Version rather than SemanticVersion $PSVersion = $PSVersionTable.PSVersion -as [Version] # Write-Progress not supported yet on Core