Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I created script in qv to download file from Web page using powershell + BITS. Everything is working fine when I reload document manually but when I run it through management control or just wait for scheduled start, it's not working. There is no error or anything but it just won't download file. I'm log file I can see the script and it looks like there is no issue but I don't get any file. I checked allow to execute external program in document properties. What can be wrong here?
My script:
Let vCOMMAND = 'Import-Module BitsTransfer
Start-BitsTransfer -Source http://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?file=table_of_contents.x... -Destination D:\QLIKVIEW\Dane\WEB\EUROSTAT\table_of_contents.xml';
Execute powershell -command $(vCOMMAND);
Thanks in advance
Ok, I found the problem. For some reason powershell command:
Import-Module BitsTransfer
Start-BitsTransfer -Source http://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?file=table_of_contents.x... -Destination D:\QLIKVIEW\Dane\WEB\EUROSTAT\table_of_contents.xml
was not working when reloading with distribution service.
But this one works:
Invoke-WebRequest -Uri http://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?file=table_of_contents.x... -OutFile D:\QLIKVIEW\Dane\WEB\EUROSTAT\table_of_contents.xml
Both commands work fine when reloading manually in QlikView desktop.
does the user running your QlikView service has an access to this file/rights to execute command statement. Remember, that running it localy you are running it with your credentials, when triggering from server you are using service account credentials.
pozdr.
Lech
Yes, it has access to that file. It's the same user. QlikView Service is running on the same user I'm using to develop documents. It has full admin rights.
check this topic and see whether you are missing something:
https://qlikviewcookbook.com/2016/01/authorizing-the-script-execute-statement/
cheers
Lech
I also found this topic and tried that before I created new discussion. Nothing works...
Ok, I found the problem. For some reason powershell command:
Import-Module BitsTransfer
Start-BitsTransfer -Source http://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?file=table_of_contents.x... -Destination D:\QLIKVIEW\Dane\WEB\EUROSTAT\table_of_contents.xml
was not working when reloading with distribution service.
But this one works:
Invoke-WebRequest -Uri http://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?file=table_of_contents.x... -OutFile D:\QLIKVIEW\Dane\WEB\EUROSTAT\table_of_contents.xml
Both commands work fine when reloading manually in QlikView desktop.
Good kn you mate!