[PowerShell, PowerCLI] Check for VMs that are not being backuped



Show first post

38 comments

Userlevel 7
Badge +17

@JMeixnerWell the backup user could have only limited permissions on a certain container/folder, because of security reasons. On the other hand I think it's a very unlikely scenario that you're missing VMs in the backup on which you don't have access...😅


This is what I thought 😎

But it is possible… on the other hand, this can happen with PowerCLI, too.

Userlevel 7
Badge +14

@JMeixner Well the backup user could have only limited permissions on a certain container/folder, because of security reasons. On the other hand I think it's a very unlikely scenario that you're missing VMs in the backup on which you don't have access...😅

Userlevel 7
Badge +17

@vNote42I thought about your script (which is very useful by the way) and wondered if we could remove the PowerCLI as a dependency. We could query all VMs with the Veeam cmdlet “Find-VBRViEntity”; given that the Veeam account can see all VMs.

$VMs = Find-VBRViEntity -VMsAndTemplates | where id -like "*VM*"

Any thoughts on this? Do I forget something here, which could result in wrong or missing results?

 

Also is there a way via to get the VMware MoRef ID with the Veeam Powershell? I know this value is in the database, but I couldn’t find it in the Powershell. This way we could create a 100% match for VM/restorepoint.

Good idea @regnor ! I resinized find-vbrvientity some time ago. But I did not test any further. Would be a nice feature not to need PowerCLI any more. But you are probably right, you will just get VMs the user has permissions for.

I will try it, when I next need the script :slight_smile:


The Veeam user should have permission to access all VMs, shouldn't it? Otherwise you are not able to backup all of your VMs….

Userlevel 7
Badge +20

Another great script to add to my repo of scripts.  Thanks for the contribution. :smiley:

Userlevel 7
Badge +13

@vNote42I thought about your script (which is very useful by the way) and wondered if we could remove the PowerCLI as a dependency. We could query all VMs with the Veeam cmdlet “Find-VBRViEntity”; given that the Veeam account can see all VMs.

$VMs = Find-VBRViEntity -VMsAndTemplates | where id -like "*VM*"

Any thoughts on this? Do I forget something here, which could result in wrong or missing results?

 

Also is there a way via to get the VMware MoRef ID with the Veeam Powershell? I know this value is in the database, but I couldn’t find it in the Powershell. This way we could create a 100% match for VM/restorepoint.

Good idea @regnor ! I resinized find-vbrvientity some time ago. But I did not test any further. Would be a nice feature not to need PowerCLI any more. But you are probably right, you will just get VMs the user has permissions for.

I will try it, when I next need the script :slight_smile:

Userlevel 7
Badge +14

@vNote42 I thought about your script (which is very useful by the way) and wondered if we could remove the PowerCLI as a dependency. We could query all VMs with the Veeam cmdlet “Find-VBRViEntity”; given that the Veeam account can see all VMs.

$VMs = Find-VBRViEntity -VMsAndTemplates | where id -like "*VM*"

Any thoughts on this? Do I forget something here, which could result in wrong or missing results?

 

Also is there a way via to get the VMware MoRef ID with the Veeam Powershell? I know this value is in the database, but I couldn’t find it in the Powershell. This way we could create a 100% match for VM/restorepoint.

Userlevel 7
Badge +4

@vNote42 : Wonderful, It is used for Audit for sure :) 

Userlevel 4
Badge +1

Excellent resource. Thanks a lot. 

Will it be still valid for future releases or you need to do some housekeeping stuff?

Thanks!

Good question. The beauty when using PowerShell is the compatibility. This Script will work in v9, v10 and v11 as well. 

 

For V11 you need to change the “Add-PSSnapin VeeamPSSnapin” with "Import-Module Veeam.Backup.PowerShell"

really very usable!
Thank you

Userlevel 7
Badge +13

Excellent resource. Thanks a lot. 

Will it be still valid for future releases or you need to do some housekeeping stuff?

Thanks!

Good question. The beauty when using PowerShell is the compatibility. This Script will work in v9, v10 and v11 as well. 

 

Userlevel 6
Badge +1

Excellent resource. Thanks a lot. 

Will it be still valid for future releases or you need to do some housekeeping stuff?

Userlevel 7
Badge +13

Thank you, very usefull script.

Tested and found 2 VMs without backups ;-)

 

So sharing the script has already paid off!

:thumbsup:

Userlevel 2

Thank you, very usefull script.

Tested and found 2 VMs without backups ;-)

 

Comment