I am looking for a powercli script that I can run that will gather, email and reset the information below:
rm /var/log/vmksummary
rm /var/log/vmksummary.html
rm /var/log/vmksummary.d/*
/usr/sbin/logrotate -fv /etc/logrotate.conf
/etc/cron.hourly/vmkheartbeat
/etc/cron.daily/vmkuptimereport
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1026
Craig
There aren't any cmdlets to interact with the COS.
But you can use the plink.exe command from the PuTTY Suite to do this (provided you allow ssh access for root or have sudo set up correctly.
See for example how plink.exe can be used.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
We are moving away from ESX to ESXi and are not enabling SSH so that is out
I am attempting to move from running a script on each host to gather this info to running a single script on the vCenter.
You can set remote logging to a syslog server for ESXi. You can also use the vMA appliance to collect logs.
Shouldn't you be looking at the vMA in that case ?
The problem is that there are currently no cmdlets for this type of actions and the APIs that are used for this are afaik not public.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference