simple copy command

Welcome Forums General PowerShell Q&A simple copy command

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
9 months ago.

  • Author
    Posts
  • #93769

    Participant
    Points: 0
    Rank: Member

    Hi Guys,
    I am trying to copy some content from a remote server, (where I have read-only access) with different set of credentials to a local shared location by using power shell. Can anyone show any direction?

    Tried the below couple of cmdlet but no luck.
    1.Copy-Item
    Error: Cannot retrieve the dynamic parameters for the cmdlet
    2.Start-BitsTransfer
    Error:Not able to find the path even if the path is correct.

    Note: I do not want to use "net use"

  • #93825

    Participant
    Points: -19
    Rank: Member

    You can first use PSDrives like

    New-PSDrive -Name X -PSProvider FileSystem -Root "yourPath" -Credentials

    Than you can copy the data using Copy-Item to your destination.

    Copy-Item -Path X:\ -Destination "yourDestination"

    For more information use Help Copy-Item -example.

The topic ‘simple copy command’ is closed to new replies.