A
A
andreystrelkov2015-11-11 18:27:55
PowerShell
andreystrelkov, 2015-11-11 18:27:55

How to run a BAT file using Powershell on a remote computer?

Good afternoon, how can I run a BAT file on a remote computer (virtual machine), i.e. so that it does not download to the machine where the powershell script is run, but is it executed on the remote machine?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anatoly, 2015-11-13
@rbobot

invoke-command -computername comp1 {cmd /c C:\temp.bat}

E
EvgeniyKonstantinov, 2015-11-11
@EvgeniyKonstantinov

psexec

N
nirvimel, 2015-11-11
@nirvimel

  1. An SSH server is installed on the remote machine .
  2. PuTTY is installed on the local .
  3. You get access to a remote machine and the ability to run any BATs on it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question