Trying to work out what the identifier is for the Remove-VBOEntityData command on Teams. We get a list of Teams with $teams = Get-VBOOrganizationTeam -Organization $org. This gives us a list of teams in the organization's backups. The retrieved data has the fields: OrganizationId; OfficeId; DisplayName; Description; and Mail.
Next we try to use the list of teams to remove any data in the repository. We use a command like: ForEach ($team in $teams) {$teamRemove = Get-VBOEntityData -Type Team -Repository $repository -Team $team.Mail; Remove-VBOEntityData -Team $teamRemove}
This is failing with a bind error. Fails for any of the retrieved data fields.
Cannot bind parameter 'Team'. Cannot convert the [] value of type "System.String" to type "Veeam.Archiver.PowerShell.Model.VBOOrganizationTeam".
Do we need to cast the output for OfficeID to a GUID before passing it to Remove-VBOEntityData? Or is there a different field we should be using?
TIA
-
- Influencer
- Posts: 24
- Liked: never
- Joined: Feb 20, 2022 11:47 pm
- Contact:
-
- Product Manager
- Posts: 9848
- Liked: 2610 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: Teams identifier for Get- or Remove-VBOEntityData
Hello OzFenric
Get-VBOOrganizationTeam gives you a list of all Teams in your M365 tenant.
If you want to know which teams you have in your backup repository, you must use Get-VBOEntityData:
I also see the same issues when I'm trying to use your code. I'll check that further in my lab if it works that way.
Is your goal to delete content of every team you have backed up? Then you can maybe use the following code:
Best,
Fabian
Get-VBOOrganizationTeam gives you a list of all Teams in your M365 tenant.
If you want to know which teams you have in your backup repository, you must use Get-VBOEntityData:
Code: Select all
$repo = Get-VBORepository -Name "REPO_Name"
Get-VBOEntityData -Repository $repo -Type Team
Is your goal to delete content of every team you have backed up? Then you can maybe use the following code:
Code: Select all
$repo = Get-VBORepository -Name "REPO_Name"
$TeamsInBackup = Get-VBOEntityData -Repository $repo -Type Team
ForEach ($team in $TeamsInBackup)
{Remove-VBOEntityData -Repository $repo -Team $team
}
Fabian
Product Management Analyst @ Veeam Software
-
- Influencer
- Posts: 24
- Liked: never
- Joined: Feb 20, 2022 11:47 pm
- Contact:
Re: Teams identifier for Get- or Remove-VBOEntityData
We're attempting to remove all Teams data for a specific organisation from a shared repository. The code you've provided is similar to what we've already tried, but Remove-VBOEntityData -Repository $repo -Team $team fails because it can't use the $team variable. What we're looking for here is the property that the -Team parameter will use to identify the team to remove.
-
- Product Manager
- Posts: 9848
- Liked: 2610 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: Teams identifier for Get- or Remove-VBOEntityData
Hi OzFenric
You can use a parameter -Organization with Get-VBOEntityData to get only teams from a specific organization in your backup repository and delete them.
Best,
Fabian
You can use a parameter -Organization with Get-VBOEntityData to get only teams from a specific organization in your backup repository and delete them.
Code: Select all
$org = Get-VBOOrganization -Name "ORG_Name"
$repo = Get-VBORepository -Name "REPO_Name"
$TeamsInBackup = Get-VBOEntityData -Repository $repo -Organization $org -Type Team
ForEach ($team in $TeamsInBackup)
{
Remove-VBOEntityData -Repository $repo -Team $team
}
Fabian
Product Management Analyst @ Veeam Software
Who is online
Users browsing this forum: scrat and 14 guests