I've created a simple batch file that opens the host ESXi shell via ssh on putty and I'd like to execute commands in that shell from a file.
I've tried adding "-m commands.txt" to my batch file but the commands aren't run in my putty session and it causes it to close.
How can I run the batch file to open the putty session and run commands in the new putty session automatically?
Thanks
EDIT: This is the code I've tried running:
start cmd.exe "C:puttyShortcut.lnk" -m C:commands.sh
Note that the putty shortcut contains my host login information
-C:putty.exe -ssh user@host -pw password
commands.sh currently just looks like this while I focus on getting this to work
#!/bin/sh
vim-cmd vmsvc/getallvms