简体   繁体   中英

Powershell Bitstransfer

I just wanted to write a script, that automates file downloading for me, to keep the files up to date.

I can download .pdf,.txt and so on from different websites, but I can't manage to download an .exe from a specific website. Though I can download the .exe via my browser without any problems.

I start the script in the powershell(started as administrator). Then it says Connections, but it doesn't connect. So the progression bar, doesn't change. Then after a few seconds it stops and i get my prompt back.

It does create a file but it's 0b big.

This is my scrip:

Import-Module BitsTransfer 
Start-BitsTransfer -Source http://media.kaspersky.com/utilities/VirusUtilities/EN/rectordecryptor.exe `
-Destination S:\Programme\Antiviren\rector.exe

The script works, it sound more like a permissions issue

Do you or the account ( if scheduled task) have write access to the folder S:\\Programme\\Antiviren\\ also Check if folder is read only

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM