Quantcast
Channel: VMware Communities : Document List - vSphere PowerCLI
Viewing all articles
Browse latest Browse all 379

Run Script on host ESX and copy results back to server

$
0
0

I am new to using PowerCLI and hoping that this will save me time from going to 26 ESX host servers and doing it manually. I am looking for a command to run an audit.sh script that is copied out to the ESX servers in the /tmp directory already. The audit.sh script runs and creates an output.txt. I would like to copy that back -localhost C:\Audit\Results after the audit.sh is complete.

 

The steps I take now manually:

Log into each host

su to root
change directory to \tmp

run sh ./audit.sh

Copy file back using winscp

(with 26 servers this is very time consuming)

 

 

Help needed:

A command to run the audit.sh script located in \tmp

Then copy the latest *.txt in \tmp to the local host C:\Audit\Results

 

Is this even possible, any advice would help. Thank you.


Viewing all articles
Browse latest Browse all 379

Trending Articles