Ignore the word wrapping each command line is purely a single line of code. Found these results scattered in different areas of the Forums, so much of the results can be found if you do a short search on things like "Search files on Datastores" or something along those lines.
Something like this may work for you. It will take a while for it to collect all the data though if you have a lot of folders and VMs to sort through and depending on the size of your storage solution:
To search any datastore for VMX but not local storage
dir -recurse (get-datastore * | where {$_.Name -notlike "*local*"}).datastorebrowserpath -Include "*.vmx" | select Name,DatastoreFullPath,LastWriteTime
This just checks all datastores for VMX
dir -recurse (get-datastore *).datastorebrowserpath -Include "*.vmx" | select Name,DatastoreFullPath,LastWriteTime
To search a specific datastore for VMX
dir -recurse (get-datastore "datastorename").datastorebrowserpath -Include "*.vmx" | select Name,DatastoreFullPath,LastWriteTime
To export the results to a CSV or something just add a piped statement
dir -recurse (get-datastore *).datastorebrowserpath -Include "*.vmx" | select Name,DatastoreFullPath,LastWriteTime | Export-Csv c:\Temp\VMXFiles.CSV -Append -NoTypeInformation -Confirm:$false
Hope this helps in your efforts!!