Running batch files via the Remote Desktop Agent
Hi,
I'm struggling to figure out how to run batch files correctly via the remote agent. I have no trouble running Powershell scripts, but can't seem to find the same success running batch files. When I right-click a saved remote desktop (or multiple saved remote desktop) and click 'Execute script via Agent', it won't allow me to to select an actual batch file when I have the Command Line option select. How do I actually select a batch file as I do a script when I have Powershell selected (it provides a filename option)?
I've also tried using the 'Run' option, but when I point it to a batch file and then execute it nothing happens. And, actually, if I input a command directly into the command line option, sometimes even though the command appears to execute it doesn't actually do what it was supposed to do. For example, if I use this command to empty the recycle bin 'rd /s c:\$Recycle.Bin' in the Command Line option, it brings up a CMD window asking me to verify that I want to empty the recycle bin. I input Y for yes, but the recycle bin is not emptied.
The only solution I've found so far is to actually put the batch file on the remote machine's desktop and then run a command to execute it, but that's not quite as efficient as I'd like it to be. Any help solving this issue will be much appreciated!
Also, it there a way it import my own local scripts into RDM so that they are available in the Script/Tools tab when executing via the Agent? I can't find an option to do so in the Script/Tool Manager or anywhere else.
Thanks!
thank you this is very informative. Also didn't work for the first time but this thread is wonderful. Feel so obliged to be a part of such a informative community.