- January 21, 2016 at 12:39 am #34116
I hope, someone encountered an equal or similar problem like myself and has some hints.
I use PSExec (with domain admin credentials) for connecting to 1 to n machines at the same time, then transfering executable content to the remote station via share. Can be whole programs or batches or powershell scripts.
Everything is working fine except one thing:
If I execute a powershell script that is initiating a download sequence via system.net.webclient class the process is hanging if the domain admin is not really authenticated in an interactive session.
If the domain admin is authenticated in a real interactive session I can see that the execution of the script is fully succesful. If not, the behaviour is identical but neither 'DownloadString' nor 'DownloadFile' is running properly.
Before execution of a PowerShell script I ensure via registry setting that the execution policy is set to unrestricted.
Has anyone an idea?
Greets RobertJanuary 21, 2016 at 10:45 am #34133
If you could post your code we can happily help you out. There is not one reason I can imagine needing to use PSExec this day and age. You will really want to take a look into invoke-command for your remote parallel execution of a file. As for transferring files to different nodes you can use New-PSSdrive to open a drive to whichever location you like. From there Copy-item will help you pass those files to the endpoint.
You must be logged in to reply to this topic.