There isn't a path listed, so my first assumption was that it would search the entire restore point for any folder named "Vacation" and then restore any files named "CyclingTripJuly", but that didn't seem to work when I tested it. Is there something I am misinterpreting in the example?
My end goal is to have a script that will check for a specific file on all volumes and restore it, and I would rather not have to hard code the path for each volume.
Example 3, that you referenced, doesn't fit your use case which is why it's not working as expected. That said, none of the provided examples match your use case specifically.
Additionally, the Path parameter is available for this cmdlet as shown in our documentation.
For your use case, it seems you don't need the path as you want to search all volumes. This is what the command looks like to search the entire restore point:
This code searches the entire restore point for any folders/files with the specified name. After retrieving the item you searched for, you can restore the it using the Start-VBRWindowsGuestItemRestore cmdlet.
Start-VBRWindowsGuestItemRestore : Cannot validate argument on parameter 'Item'. The argument is null or
empty. Provide an argument that is not null or empty, and then try the command again
I believe I have solved the issue. I had flagged the file to be restored as "hidden", and it would appear that when using Get-VBRWindowsGuestItem it doesn't find hidden files or folders.
Thanks for following up! Glad to hear you got things working!
@oleg.feoktistov This is a good feature add. I see this potentially an additional flag for the cmdlet with a warning that it will increase the time required for the cmdlet to complete.
After playing around with this all day, I have determined I was wrong about why it was not working, probably due to my own misunderstanding of how Get-VBRWindowsGuestItem actually works. For anyone who stumbles upon this in the future, Get-VBRWindowsGuestItem works by breaking up the file path into pieces. I ultimately just used it to grab the backed up volume letters and combined them into a path variable. This is what I ultimately developed: