Programatically item level restore VM with Azure Backup

Dennis 0 Reputation points
2023-09-11T14:55:23.8933333+00:00

Anyone using Azure Backup for VMs who’s managed to do item-level restore (to original location) programmatically? With Powershell I get stuck at the step where I get the ”mount script” (exe) & password. Restoring entire VM is super easy because that doesn't require the download and running of a executable but restoring specific files/folders seem to require that.

To clarify below is the link to the documentation I'm trying to follow, but it's missing the steps on how to run the downloaded executable unattended with password as input/parameter. I've tried stuff like .*.exe $password etc but nothing works, it just opens in a new window and prompts me for the password.

https://learn.microsoft.com/en-us/azure/backup/backup-azure-vms-automation#restore-files-from-an-azure-vm-backup

The executable seems to be running a Powershell script (which is downloaded along with the executable) along with some other stuff so I guess it should be possible somehow... I'm just not smart enough to crack it myself... not fast enough for me to lose my patience anyway.

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,246 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,800 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,510 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,462 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ricardo Correia 90 Reputation points Microsoft Employee
    2023-09-11T23:55:52+00:00

    Hi Dennis,

    The passphrase cannot be passed as argument when calling IaaSVMILRExeForWindows.exe, it only catches whatever you type on the console that opens.

    The executable, after getting the passphrase, calls the generated WindowsPowershellISCSIScriptForILR.ps1 (which is always the same) with the arguments that you can see on the file header if you edit it (the Param section on top).
    However, it is not publicly documented how that passphrase is cut and what parts of it will fill each of the parameters section

    Out of curiosity, what is the need for such capability? Just for me to understand what could be the business justification for it

    Hope this helps!

    RAC

    Please Accept the answer if the information helped you. This will help us and others in the community as well.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.