Skip to content

Fix the scripts used for Copy-Item -FromSessoin/-ToSession scenarios and also enable tests - #27773

Draft
Dongbo Wang (daxian-dbw) wants to merge 2 commits into
PowerShell:masterfrom
daxian-dbw:copy-item
Draft

Fix the scripts used for Copy-Item -FromSessoin/-ToSession scenarios and also enable tests #27773
Dongbo Wang (daxian-dbw) wants to merge 2 commits into
PowerShell:masterfrom
daxian-dbw:copy-item

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Aug 6, 2026

Copy link
Copy Markdown
Member

PR Summary

  • Fix the scripts used for Copy-Item -FromSessoin/-ToSession and PSEdit. They use -Encoding Byte, which only works in PS5.1. In PS 7+, we need to use -AsByteStream instead. So, those scenarios (copy alternate data stream to/from remote PS 7 session and edit file from a remote PS 7 session) have been broken for a long time.
  • The remote tests for Copy-Item have always been disabled. This PR re-enables those tests for Windows (the HelperRemoting module only works on Windows).

PR Checklist

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@daxian-dbw Dongbo Wang (daxian-dbw) added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Aug 6, 2026
@daxian-dbw Dongbo Wang (daxian-dbw) changed the title Enable and fix remote tests for Copy-Item Fix the scripts used for Copy-Item -FromSessoin/-ToSession scenarios and also enable tests Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant