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?