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

This topic contains 3 replies, has 3 voices, and was last updated by  Stuart Fleck 2 years, 6 months ago.

  • Author
  • #33197

    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


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

  • #33218

    Srikanth Byram

    hi andrew -even this is not working

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

  • #33232

    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.