Maintain control of your Microsoft 365 data
Post Reply
Ctrl+Alt+Decimate
Novice
Posts: 3
Liked: 1 time
Joined: Jun 05, 2025 10:08 pm
Contact:

Deleting Teams Repository Object

Post by Ctrl+Alt+Decimate »

Hello,

Pebkac issue here: Veeam Explorer for 365 is new to our environment. Doing backup, restoration, and deletion testing with Mail, Teams, SharePoint. I was able to delete some SharePoint sites easily enough so I have some idea of what I am doing, but struggling with the Teams aspect.

Per documentation and some forum threads here, I am trying to follow the syntax (Remove-VBOEntityData -Repository <VBORepository> -Team <VBOTeamData> [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
) and I have compiled the following: RemoveVBOEntity -Repository $repository -Team $team

Where $repository is the repo we're working out of and $team is the object with the displayed officeID I'm trying to delete, consistent with the EntraAD ID for that object. To me, that all makes sense. However, when I run the command I run into "Remove-EBOEntityData: cannot bind parameter 'Team'. Cannot convert the "team name" value of type "veeam.Archier.PowerShell.Model.VBOOrganization to type "Veaam.Archiver.PowerShell.Cmdlets.DataManagement.Models.VBOTeamData."

Help please, thanks!
track1044
Novice
Posts: 6
Liked: 1 time
Joined: Apr 07, 2025 8:52 am
Full Name: David Wellendorf
Contact:

Re: Deleting Teams Repository Object

Post by track1044 »

When migrating data using move-entity we got the teams by using:

Code: Select all

$teams = Get-VBOEntityData -Type Team -Repository $sourceRepo -Organization $Org
Where $sourceRepo is the sourceRepo object and $org is the organization object.

My guess is you are passing the team from the VBOorganizationTeam cmdlet using the following snippet:

Code: Select all

$team = Get-VBOOrganizationTeam -Organization $org -Id xxx-xxx-xxx-xxx
but its the wrong type and you should probably use this:

Code: Select all

$correct_teamobject = Get-VBOEntityData -Repository $repository -Team $team
Get-VBOEntityData -Repository <VBORepos ... rameters>]

This should then be able to get passed to Remove-VBOEntityData.
Ctrl+Alt+Decimate
Novice
Posts: 3
Liked: 1 time
Joined: Jun 05, 2025 10:08 pm
Contact:

Re: Deleting Teams Repository Object

Post by Ctrl+Alt+Decimate »

Thanks for the reply,

Sorry if it's over my head. Still learning the PS commands here.

I was using the Get-VBOOrganizationTeam -Organization $org -Id xxx-xxx-xxx-xxx for variable $team because I was trying to reference the OfficeID to distinguish between the various teams we have. So then I was using the 'Remove-VBOEntityData -Organization $org -Repository $repository -Team $team command to do that since that made sense to me. But it generates the error above. I tried what you suggested, but that command is referencing all of the teams we've backed up so I don't know how that would remove the one I'm looking to delete. I tried it anyway with -whatif and it threw a different error "Remove-VBOEntityData: Cannot convert 'System.Object[]' to the type 'Veeam.Archiver.PowerShell.Cmdlets.DataManagement.Models.VBOTeamData' required by parameter 'Team'. Specified method is not supported."
track1044
Novice
Posts: 6
Liked: 1 time
Joined: Apr 07, 2025 8:52 am
Full Name: David Wellendorf
Contact:

Re: Deleting Teams Repository Object

Post by track1044 » 1 person likes this post

You shouldn't use the first one, that was just to rationalize my thoughts.
My guess is you will have to do this:

Code: Select all

# Fetch the team in the organization
$org_team = Get-VBOOrganizationTeam -Organization $org -Id xxx-xxx-xxx-xxx

# Get the correct team within your repo
$entity_team = Get-VBOEntityData -Repository $repository -Team $org_team

# Remove the team instance from the repo 
Remove-VBOEntityData -Repository $repository -Team $entity_team
Ctrl+Alt+Decimate
Novice
Posts: 3
Liked: 1 time
Joined: Jun 05, 2025 10:08 pm
Contact:

Re: Deleting Teams Repository Object

Post by Ctrl+Alt+Decimate » 1 person likes this post

Okay, I figured it out finally! Yeah, I think we were on the same track, I'm just a noob with this.

$Organization - Get-VBOOrganization -Name "our organization name"
$Team = Get-VBOOrganizationTeam -Organization $Organization -ID "Entra Object ID"
Get-VBOEntityData -Repository -Team $Team
$TeamToRemove = Get-VBOEntityData -Repository $Repository -Team $Team
Remove-VBOEntityData -Repository $Repository -Team $TeamToRemove


> Remove-VBOEntityData -Repository $repository -Team $TeamToRemove
Confirm
Are you sure you want to perform this action?

Admittedly, I'm not sure why this worked as opposed to what I was doing before. Anyway, hope this helps someone else down the road.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], DanielJ, Polina and 30 guests