How to restore a previous file version, found within the files properties

For example:
image

I want to restore the most previous version that isn’t the current. I’ve tried using PowerShell with no luck so far. Any ideas?

Via UiPath? This is not something that is supported by any activities as far as I know as its quite niche.

It’s not supported through an activity directly no, but there is a PowerShell activity and as well as invoke code.

Is there a use case for this though? Why do you need to do this on a regular basis? Just backup your files?

Sometimes the intelligent keyword trainer activity writes back an invalid JSON, causing future processes to error out. My current handling is to revert the file to the previous version manually. I instead want to do this automatically.

Then my point still stands, do regular backups.

The windows restore thing I dont think is meant for automated restorations and you need to set up some stuff, it might still miss things, whilst possible, it doesn’t make sense when you can just regularly archive yourself.