diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs index ea5b8dfdf..f595080f6 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs @@ -483,7 +483,10 @@ namespace Microsoft.PowerShell string exceptionMessage = null; try { - file = Path.GetFullPath(args[i]); + // Normalize slashes + file = args[i].Replace(StringLiterals.AlternatePathSeparator, + StringLiterals.DefaultPathSeparator); + file = Path.GetFullPath(file); } catch (Exception e) {