Not sure if it is due to #6998 because that is only listed in 6.1.0-preview.3 changes and not 6.1.0-preview.2 changes. As for 6.1.0-preview.1, it is working on Nano Server container image.
Affected Platform
- microsoft/nanoserver:sac2016
- microsoft/nanoserver:1709
Steps to reproduce
- Pull Nano Server build 1709/sac2016(latest) docker container image
C:\> docker pull microsoft/nanoserver:latest
- Run Nano Server build 1709/sac2016(latest) docker container
C:\> docker run --rm -it microsoft/nanoserver:latest
- Download PowerShell 6.1.0-preview.2 / PowerShell 6.1.0-preview.3 win-x64 Binary Zip
PS C:\> Invoke-WebRequest `
-Uri 'https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/PowerShell-6.1.0-preview.2-win-x64.zip' `
-OutFile 'C:\PowerShell-6.1.0-preview.2-win-x64.zip'
- Expand PowerShell 6.1.0-preview.2 / PowerShell 6.1.0-preview.3 win-x64 Binary Zip
PS C:\> Expand-Archive `
-Path 'C:\PowerShell-6.1.0-preview.2-win-x64.zip' `
-DestinationPath "$ENV:ProgramFiles\PowerShell\6.1.0-preview.2"
- Run PWSH from command prompt
C:\> cd C:\Program Files\PowerShell\6.1.0-preview.2
C:\Program Files\PowerShell\6.1.0-preview.2>pwsh
PowerShell v6.1.0-preview.2
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/pscore6-docs
Type 'help' to get help.
Cannot load PSReadline module. Console is running without PSReadline.
FailFast: This function is not supported on this system
at System.Environment.FailFast(System.String, System.Exception)
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String, System.String[], Int32)
at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])
Expected behavior
- PowerShell v6.1.0-preview.2 / v6.1.0-preview.3 should run on Nano Server
C:\Program Files\PowerShell\6.1.0-preview.2>pwsh
PowerShell v6.1.0-preview.2
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/pscore6-docs
Type 'help' to get help.
PS C:\>
Actual behavior
- PowerShell 6.1.0-preview.2 Error output from Nano Server
PowerShell v6.1.0-preview.2
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/pscore6-docs
Type 'help' to get help.
Cannot load PSReadline module. Console is running without PSReadline.
FailFast: This function is not supported on this system
at System.Environment.FailFast(System.String, System.Exception)
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String, System.String[], Int32)
at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])
- PowerShell 6.1.0-preview.3 Error output from Nano Server
PowerShell v6.1.0-preview.3
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/pscore6-docs
Type 'help' to get help.
Cannot load PSReadline module. Console is running without PSReadline.
FailFast:
This function is not supported on this system
at System.Environment.FailFast(System.String, System.Exception)
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String, System.String[], Int32)
at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])
Exception details:
System.ComponentModel.Win32Exception: This function is not supported on this system
at System.Management.Automation.Internal.SecuritySupport.GetSaferPolicy(String path, SafeHandle handle)
at System.Management.Automation.Security.SystemPolicy.TestSaferPolicy(String testPathScript, String testPathModule)
at System.Management.Automation.Security.SystemPolicy.GetAppLockerPolicy(String path, SafeHandle handle)
at System.Management.Automation.Security.SystemPolicy.GetLockdownPolicy(String path, SafeHandle handle)
at System.Management.Automation.Security.SystemPolicy.GetSystemLockdownPolicy()
at Microsoft.PowerShell.ConsoleHost.DoRunspaceInitialization(Boolean skipProfiles, String initialCommand, String configurationName, Collection`1 initialCommandArgs)
at Microsoft.PowerShell.ConsoleHost.DoCreateRunspace(String initialCommand, Boolean skipProfiles, Boolean staMode, String configurationName, Collection`1 initialCommandArgs)
at Microsoft.PowerShell.ConsoleHost.CreateRunspace(Object runspaceCreationArgs)
at Microsoft.PowerShell.ConsoleHost.DoRunspaceLoop(String initialCommand, Boolean skipProfiles, Collection`1 initialCommandArgs, Boolean staMode, String configurationName)
at Microsoft.PowerShell.ConsoleHost.Run(CommandLineParameterParser cpp, Boolean isPrestartWarned)
at Microsoft.PowerShell.ConsoleHost.Start(String bannerText, String helpText, String[] args)
at Microsoft.PowerShell.ConsoleShell.Start(String bannerText, String helpText, String[] args)
at Microsoft.PowerShell.UnmanagedPSEntry.Start(String consoleFilePath, String[] args, Int32 argc)
Environment data
- None, because pwsh.exe cannot load the console.
C:\Program Files\PowerShell\6.1.0-preview.2>pwsh -v
PowerShell v6.1.0-preview.2
C:\Program Files\PowerShell\6.1.0-preview.3>pwsh -v
PowerShell v6.1.0-preview.3
Not sure if it is due to #6998 because that is only listed in 6.1.0-preview.3 changes and not 6.1.0-preview.2 changes. As for 6.1.0-preview.1, it is working on Nano Server container image.
Affected Platform
Steps to reproduce
C:\> docker pull microsoft/nanoserver:latestC:\> docker run --rm -it microsoft/nanoserver:latestC:\> powershellPS C:\> ExitExpected behavior
Actual behavior
Environment data