# Unable to copy files to remotely server

**URL:** <https://forums.powershell.org/t/unable-to-copy-files-to-remotely-server/18671>\
**Category:** PowerShell Help\
**Created:** [February 24, 2022, 6:21am UTC](https://forums.powershell.org/t/unable-to-copy-files-to-remotely-server/18671 "2022-02-24T06:21:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forums.powershell.org/u/Ben)\
**Post date:** [February 24, 2022, 6:21am UTC](https://forums.powershell.org/t/unable-to-copy-files-to-remotely-server/18671/1 "2022-02-24T06:21:18Z")

</div>

```auto
$s=New-PSSession -ComputerName (Import-Csv c:\1.csv).hostname

   Copy-Item -Path C:\ibm\BESRemove.exe -Destination C:\ibm\BESRemove.exe -Recurse -Force -ToSession $s
   Copy-Item -Path C:\ibm\treesizefree.exe -Destination C:\ibm\treesizefree.exe -Recurse -Force -ToSession $s

```

error report:

Copy-Item : Cannot convert ‘System.Object’ to the type ‘System.Management.Automation.Runspaces.PSSession’ required by parameter ‘ToSession’. Speci  
fied method is not supported.  
Please help.Thank you.

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forums.powershell.org/u/Ben)\
**Post date:** [February 24, 2022, 7:01am UTC](https://forums.powershell.org/t/unable-to-copy-files-to-remotely-server/18671/2 "2022-02-24T07:01:34Z")

</div>

This issue is resolved,thank you.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:18pm UTC](https://forums.powershell.org/t/unable-to-copy-files-to-remotely-server/18671/3 "2024-05-16T20:18:17Z")

</div>


