# Define variables $localFolder = "./src/." $remoteUser = "debian" $remoteHost = "robe.vincent-bouquet.fr" $remotePath = "/var/www/html/public/reap" $port = 22 # Change this if your SSH server uses a different port # Build the SCP command $copyCommand = "scp -r -P ${port} `"${localFolder}`" ${remoteUser}@${remoteHost}:`"${remotePath}`"" # Execute the command Write-Host "Executing: $copyCommand" Invoke-Expression $copyCommand