User Tools

Site Tools


correr_remotamente_script_de_powershell

This is an old revision of the document!


Run a Script

To run a script on one or many remote computers, use the FilePath parameter of the Invoke-Command cmdlet. The script must be on or accessible to your local computer. The results are returned to your local computer.

For example, the following command runs the DiskCollect.ps1 script on the remote computers, Server01 and Server02.

Invoke-Command -ComputerName Server01, Server02 -FilePath c:\Scripts\DiskCollect.ps1
correr_remotamente_script_de_powershell.1677459461.txt.gz · Last modified: 2024/10/17 21:42 (external edit)