With the help of below command, i can able to fetch the details of files with FullName, LastWriteTime, Length only from one datastore, I am looking for the modified script to get this details from all the datastores present in the VC.

I got into the below error.. Basically I am looking for the data which can tell me how long the files are not been accessed or used in datastores. (storage cleanup activity), please suggest if you have other-ways to accomplish.

Error received:

Get-ChildItem : An error occurred while communicating with the remote host.

Seems I do not have access on some files inside the folders (as we are using "Recurse" parameter and it tries to get information on file level) it is trying to get those details and failing. I tried to get LastWriteTime & Length at folder level and got the attached results (lengh information is missing for folders and files like .iso/.txt turned with the size details). Attached the screen shot for reference.