Hi,
i need help, i need a script that list all powered off windows vm's and send them in daily mail.
thanks,
Itay
You can do something like this
$vms = Get-VM | where {$_.PowerState -eq "PoweredOff"} | Select Name Send-MailMessage -Subject "PoweredOff VMs" -To "lucd@lucd.info" ` -SmtpServer mail.lucd.info ` -Body ($vms | Out-String) ` -From "VMware.report@lucd.info"
If you schedule this script to run daily, you will get a daily email
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference