diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 index 31669f45525..f86eb6600ae 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 @@ -847,7 +847,8 @@ namespace PowershellTestConfigNamespace It "Enable-PSSession Cmdlet creates a default PSSession configuration untied to a specific PowerShell version." { $dotPos = $PSVersionTable.PSVersion.ToString().IndexOf(".") $endpointName = "PowerShell." + $PSVersionTable.PSVersion.ToString().Substring(0, $dotPos) - if ($PSVersionTable.GitCommitId.Contains("preview")) + # any pre-release (a version with a dash) is a preview release + if ($PSVersionTable.GitCommitId.Contains("-")) { $endpointName += "-preview" }