to run .exe ,.vbs ,.bat files on remote machines

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of Stuart Fleck Stuart Fleck 10 months ago.

  • Author
  • #33197
    Profile photo of Srikanth Byram
    Srikanth Byram

    hi all,

    i required your help in letting me know ,does valid authentication required to run any .exe ,.vbs or .bat files on remote machines.

    am a administrator in my organisation where i my id of part of administrative group in all the domain computers but still i am unable to run any of these files , help me out please .

    here is the cmdlet am using

    invoke-command -scriptblock { cscript "c:\myscript\script.vbs /act} -computername $computer

    this comes up with zero errors but can see .vbs file is not executing on remote machine.

    i request you to share the proper cmdlet to run all of these files on remote machine.

  • #33202
    Profile photo of Andrew

    Just wondering – should the script block be { cscript.exe "c:\myscript\script.vbs /act}

  • #33218
    Profile photo of Srikanth Byram
    Srikanth Byram

    hi andrew -even this is not working

    help me in sharing cmdlet to run bat file on remote machines .

  • #33232
    Profile photo of Stuart Fleck
    Stuart Fleck

    I am noticing that the scriptblock does not have a closed quote. it has an open quote but it is not closed. { cscript "c:\myscript\script.vbs /act} should it be { cscript "c:\myscript\script.vbs /act"} ?

    I may be wrong but I have been tripped up by the most trivial things.

You must be logged in to reply to this topic.