Automation

 View Only
  • 1.  Invoke-VMScript remote batch file

    Posted Jun 22, 2021 09:21 AM

    Hello,

    I try to run a batch file on a remote VM via invoke-vmscript, but I do not get it run.

    for example I have a file on the remote VM c:\service\test.bat

    inside the bat file:

     

     

    the invoke would looks like this:

    'C:\Service\test.bat' is not recognized as an internal or external command

     

    I´m not sure how I could do remote stuff like this. Any ideas?

    Thanks 



  • 2.  RE: Invoke-VMScript remote batch file

    Posted Jun 22, 2021 09:54 AM

    I only get that message when the BAT file does not exist.

    Can you check with



  • 3.  RE: Invoke-VMScript remote batch file

    Posted Jun 22, 2021 11:32 AM

    yes that works fine

    Directory is valid.



  • 4.  RE: Invoke-VMScript remote batch file

    Posted Jun 22, 2021 11:37 AM

    I found the fault.

    the file extension was hidden and the batchfile is not a *.bat it is a*.cmd

     

    sorry for that:-)