Thanks @LucD, it worked like charm. I tested in my lab.
Little customization needed for reporting purpose
Can you please check if following tasks are possible
1. Now we are giving DS name instead of MyDS, I want this script to fetch all the folders from all datastores from the VC.
2. Output should be in an excel/csv format with columns DS name / foldername / foldersize / lun id (not sure if it populates all in case of more than one extent)
since it is going to give more load on VC, I am bit worried if it cause any issue to vpxd process when we run it on prod machines, can we run this in a batch mode to avoid huge load on VC or adding sleep times in between to make the process cool down. I use to give sleep function in C programming but not sure about powercli.
Thank you very much for your help so far.
Regards,
Suresh