Skip to content

Enable cross providers support #6586

Closed
Closed

Description

@jianyunt

This is a feature request. Currently we do not have cross providers support in the pwsh. It can be useful for sceanrios like copy-item from a file handled by a filesystem provider and to the cloud storage or automation accounts etc, handled by SHiPS provider. For example,

PS Azure:\...\>  Copy-Item C:\test\hi.ps1 .\MyRunbook
Copy-Item : Source and destination path did not resolve to the same provider.
At line:1 char:2
+  Copy-Item C:\test\hi.ps1 .\MyRunbook
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (System.Collecti...[System.String]:Collection`1) [Copy-Item], PSArgumentException
    + FullyQualifiedErrorId : CopyItemSourceAndDestinationNotSameProvider,Microsoft.PowerShell.Commands.CopyItemCommand

Steps to reproduce

Expected behavior


Actual behavior


Environment data

> $PSVersionTable

Activity

  1. added
    Issue-Enhancementthe issue is more of a feature request than a bug
    WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.
    on Apr 7, 2018
  2. BrucePay commented on Apr 7, 2018

    @BrucePay
    Collaborator

    Note: this is something we talked about doing a long time ago. At the time there wasn't a compelling scenario: copying files to reg keys was about the best we had. Now with Azure, copying to and from various Azure (and other cloud) stores makes a lot of sense. It's probably time to take a serious look at doing this.

  3. Rob-S commented on Jan 6, 2020

    @Rob-S

    Another use case would be copying backup files to Google Cloud:
    Copy-Item -LiteralPath 'filesystem::C:\Backups\AdventureWorks2008R2.bak' -Destination 'gs:\my-gc-bucket\AdventureWorks2008R2.bak'

  4. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  5. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  6. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  7. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreWG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions