Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remotely execute a script in Windows?

I would like to have a Windows 2003 server fire a script to fire another script in a separate Windows Server 2008 computer.

I have been told that Powershell can do that, and that's fine, but I need more specific details.

Does anyone have any tips for this?

Thanks!

like image 271
Frew Schmidt Avatar asked May 14 '09 01:05

Frew Schmidt


People also ask

Can you run command prompt remotely?

Select the computer for which you want to use the command prompt. Click on Remote Command Prompt to bring the remote computer's command prompt. You can now execute the required command in the text box or you can also use the pre-defined commands.

How do I run a program remotely in PowerShell?

To do this, we'll use a combination of two cmdlets: Invoke-Command to give us the ability to run a command on the remote computer and Start-Process to actually execute the process. Invoke-Command is a PowerShell cmdlet that allows us to execute code on a remote computer just as if it were local.


1 Answers

psexec from SysInternals

like image 83
benPearce Avatar answered Oct 28 '22 09:10

benPearce