Hi Everyone,
Trying to get the list of snapshot details associated with VM's in vCenter, want to export the information in CSV format by sending a automated mail.
Please suggest me for any _powercli script.
Install simply RVtools there you will find all needed info
also will be able to extract csv or excel file
Thank you for the information,
We need an automated mail trigger to the admins and Server Owner's as well. Any help!
Hi
This should probable be in the PowerCli page but you can use
get-vm | get-snapshot | Select-Object vm, name,created,description | Export-Csv c:\temp\DailySnapshotReport.csv -NoTypeInformation
to create the csv file. If you want any additional properties you will need to add to the select-object.
You can then use the send-mailmessage command to attached the csv file.
Send-MailMessage -From from@domian.com -To to@domian.com -Subject "VMware Snapshot Report" -Body "VMware Snapshot Report attached" -SmtpServer smtp_server_Address -Attachments c:\temp\DailySnapshotReport.csv
Hi,
Thank you so much for your inputs.
Still its not working its sending a mail like below, with out any information.
Previously we used get the mails like below.
It's happening after we upgraded the vCenter to 7.x .
Scripts are running from a Remote Windows Server as a Schedule Tasks.
Other vCenter we have with 6.5 Version, reports ( automated mails) are good.
Please suggest me, if you have any KB's.