Hi Experts,
Using the Lansweeper deployment feature, I try to execute the PowerShell command "Invoke-WebRequest" on a target computer to download a small installer file (size is about 10MB) from a specified URL to that computer, which in my case takes few seconds to finish when directly tested on the target computer.
However, when I try to deploy the script (with a domain admin account!) using Lansweeper, the deployment always hangs, regardless of how much I increase the timeout limit, and the file doesn't download to the target computer. It always passed the preliminary checking while stuck at the “Initializing” step.
Here is the script I used:
Invoke-WebRequest "http://dl.google.com/chrome/install/latest/chrome_installer.exe" -OutFile C:\Temp\chrome_installer.exe;
Note that I have tried to deploy other simple PS scripts using Lansweeper and it works. For example:
"Test" | Out-File "C:\Temp\log.txt"
Moreover, I am using the “Command” action, and the command I use is:
powershell.exe -executionpolicy bypass -file "{PackageShare}\xxx.ps1"
Did I do anything obviously wrong? Did anyone try to achieve similar things and was able to get it to work?Thanks!