Forum Discussion

jon3's avatar
jon3
Level 2
2 years ago

System Recovery 21-22-23 Command Line

Hi,

Is their any command lines (command prompt) I can run to see the status/history of backups for System Recovery Desktop?

  • Are their powershell commands for me to generate reports or get backup status and info?

  • In the product ZIP file there is a folder called Docs\Automation\PowershellScripts. Take a look there.

  • Query_History.ps1 is available. It is in \Docs\Automation\PowershellScripts in the VSR install media. Copy Query_History.ps1 to your local disk.

    To run it, open a powershell window or run "powershell" on Command Prompt.
    After that, run below.

    powershell -executionpolicy bypass <path>\Query_History.ps1

    Note: <path> is a path where you put Query_History.ps1.

    The latest backup history is popped up.

    Also, if you would like to change the output from the popup message to the message in powershell, please add "#" at the beginning of 45th and 46th lines in Query_History.ps1, and add "write-host $Msg" in 47th line, and save the file. And run "powershell -executionpolicy bypass <path>\Query_History.ps1".

    If you would like to save the message as a file, run "powershell -executionpolicy bypass <path>\Query_History.ps1 > C:\temp\history.txt".

    history.txt is created in C:\temp, and the latest backup history is stored in it.