I experienced βhangsβ when running PSEXEC on a remote system, but I always attributed it to the security context in which the remote process was running.
From the PSEXEC Help:
If you omit the username of the remote process, it starts in the same one that you are running PsExec, but because the remote process impersonates it will not have access to the network of resources on the remote system . when you specify the username of a remote process, the process runs in the specified account, and will have access to any network resources that access it. Note that the password is transmitted in the clear text of the remote system.
If you are executing a process remotely, which then must access the database (stsadm.exe), then a failure may occur when you try to access a network resource, depending on how PSEXEC is executed. If this is the case, I would suggest that eventually it will end and provide some message about the unavailability of the resource.
There are two things that usually happen when you perform the deployment steps on a remote machine to prevent the behavior that you describe:
As mentioned above, make sure that all assets needed for deployment are local to the remote machine (copy files, etc.) before using PSEXEC to execute the script (* .bat, * .vbs, * .ps, etc.) - so that everything works "locally" to the remote machine.
Launch PSEXEC using the domain username / password when it is executed - note that this information is sent in clear text to the remote server.
source share