Thanks a lot LucD,
I would like to include this script in my daily report. So i think 10 days is fine . But i didnt get what you are saying on the 30 days in the script. Also i got the csv file created but there are no values in the csv file like
vmname
created date
Host
user
all the fileds are empty
Thanks
VK