This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand-Archive ignores ProgressPreference = 'SilentlyContinue' and fails over SSH #77
Comments
Workaround
|
I run from |
Probably archive should be big enough to repro. |
This is actually a limitation of script modules. Script modules inherit variable scope from the global scope, instead of from the calling script scope. The simple workaround is to set the preference variable in global scope: $global:ProgressPreference = "SilentlyContinue" More info: |
mvaessen
added a commit
to mvaessen/Windows-Containers
that referenced
this issue
Jul 4, 2023
When running on Windows Server 2019 via SSH this results in `Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer. Contact Microsoft Customer Support Services.`. Changes prevent issues with CLI non-interactive execution on Window Server 2019 by suppressing process bar for Expand-Archive command (see: PowerShell/Microsoft.PowerShell.Archive#77) Tested on Windows Server 2019 & 2022
mvaessen
added a commit
to mvaessen/Windows-Containers
that referenced
this issue
Jul 4, 2023
When running on Windows Server 2019 via SSH this results in `Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer. Contact Microsoft Customer Support Services.`. Changes prevent issues with CLI non-interactive execution on Window Server 2019 by suppressing process bar for Expand-Archive command (see: PowerShell/Microsoft.PowerShell.Archive#77) Tested on Windows Server 2019 & 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Install client of open ssh on windows https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
install server on windows https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
Run script which expands archive over SSH:
Actual:
Expected:
Invoke-WebRequest
and $ProgressPreference = 'SilentlyContinue'Machine which fails
Versions:
6.2.1 has same issue.
I expect Expand-Archive to work fine on Windows Server 2019 over Open SSH.
The text was updated successfully, but these errors were encountered: