What I'm trying to achieve is to check if some users backup are present on a Repository.
So once i have the Entra username, for example paul.atreides@dune.com i get the user object with:
Code: Select all
$org = Get-VBOOrganization
$user = Get-VBOOrganizationUser -Organization $org -UserName "paul.atreides@dune.com"
Code: Select all
PS C:\Scripts\VBO> $user
OrganizationId : 00000000-0000-0000-0000-000000000000
OfficeId : 00000000-0000-0000-0000-000000000000
OnPremisesId : 00000000-0000-0000-0000-000000000000
DisplayName : Paul Atreides
UserName : paul.atreides@dune.com
Type : User
LocationType : Office
Code: Select all
$repos = Get-VBORepository -Name repo_lr01
Get-VBOEntityData -Repository $repos -User $user
Code: Select all
PS C:\Scripts\VBO> Get-VBOEntityData -Repository $repos -User $user
DisplayName Email IsMailboxBack IsArchiveBack IsOneDriveBac IsPersonalSit AccountType Organization
edUp edUp kedUp eBackedUp
----------- ----- ------------- ------------- ------------- ------------- ----------- ------------
Paul Atre... paul.atreides@du... True True False False User
Code: Select all
PS C:\Scripts\VBO> Get-VBOEntityData -Repository $repos -User $user
Get-VBOEntityData : User not found in the repository (user ID: a1d4e9c-8a19-4c41-f6a6-eda395df4a19:00000000-0000-0000-0000-000000000000, repository ID:
25fcdf35-66d0-43b2-8d28-ea8849020d15).
Parameter name: account
At line:1 char:1
+ Get-VBOEntityData -Repository $repos -User $user
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VBOEntityData], FaultException
+ FullyQualifiedErrorId : System.ServiceModel.FaultException,Veeam.Archiver.PowerShell.Cmdlets.DataManagement.GetVBOEntityData
Get-VBOEntityData -Repository $repository -Type User -Name "Paul Atreides" i correctly get it.
What is the command Get-VBOEntityData actually do when i pass to it the user Object i get from Get-VBOOrganizationUser? Is there a way to use it by giving it directly the username? Something like
Get-VBOEntityData -Repository $repository -Type User -Username "paul.atreides@dune.com"
Or maybe there is some other way to check if the user is present on the repository?