PowerShell Script to Allow User Selection of Live Mount Snapshot with Rubrik

Purpose: Allow a user to input a VM name (or a partial name) and have it list all matching VMs as a numbered list to select from. After VM selection, it will display a numbered list of all snapshots for the selected VM to choose, which then will proceed to perform a live mount of the virtual machine.

This is the VM I am going to use for this example, but I will search for it by just using the letter B to show the VM selection.


  1. As mentioned, searching for just the letter B which returns 7 different results
  2. Selecting option 1
  3. Choosing one of the available snapshots to run (I ran 4 backups in a short amount of time just to have some results here, you can tell by the date field)
  4. Output from the Live Mount command

Back in vCenter you can see Rubrik working, it’s creating the NAS datastore and mounting it to an ESXi host, registering the VM within inventory and finally powering it on. It appends the date/time of the snapshot I selected to the end of the VM name for me (PowerShell is showing UTC time and vSphere Client is showing local time – 20:46 vs 15:46).



Leave a reply:

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Site Footer