Copy file from one linux to another linux machine using powershell

Hi All

I used the below command to copy file from my win machine to one of the linux machine.

Set-SCPFile -ComputerName 'xx.xx.xx.xx' -Credential $oCredential -LocalFile "D:\UserAccountDetails.zip" -RemotePath '/root/Scripts/' -ConnectionTimeout 30

now i need to copy some of the file from the linux machine to another linux machine using powershell.

Please need help/suggestion on this.

Parents
No Data
Reply
  • Windows PowerShell 5x has far more available cmdlets and modules than PowerShell Core 6x (Win/Linux / Mac), that is obviously changing over time.

    You need to ensure you are always up to date with PS6 on your systems of course to have the latest and greatest and on PS6 for Windows make sure you add the compatibility pack.

    This Set-SCPFile cmdlet is Windows only, on Linux/OSX, you have ftp, mount_ftp, sftp and tftp for you to use.

    Across all PowerShell versions you always have Copy-Item to use for copying files from source to destination. You can also use SSH with PS6 between Linux systems.

Children