Powershell remote http download

Viewed 89

I want to download a file via http on a remote computer. The remote computer and package server are both running at the same location. I've tried it with powershell:

$session = New-PSSession -ComputerName server1 -Credential $cred
Invoke-Command -Session $session -ScriptBlock { Invoke-WebRequest -Uri "http://packageserver/app.zip" -OutFile C:\Temp\app.zip }

Basically it works, but it looks like the download runs via my local computer to the remote computer. If I run the command directly on the remote computer the download is much faster.

Is there a way to do this with powershell? A normal file copy is not possible because CredSSP is not activated.

Thanks

0 Answers
Related