I searched and couldn't find anything, so apologies if this has been asked before.
We have one repository with a handful of organizations on it. We need to delete the data for one organization from the repository (user mailboxes, OneDrive, Teams, SharePoint, Groups).
I've been banging around in PowerShell for an hour and haven't made much progress.
$repo = Get-VBORepository -name "My Repository Name"
$users = Get-VBOEntityData -Type User -Repository $repo
This gets me all users on my repository across all organizations. Great. So then I try and filter out just the organization I need. I see in the VBO v6 documentation, you can add a -Organization parameter to the commands, but we're on v5 and need to stay there until we finish a support case.
$users | Where-Object {$_.Organization -eq "MyOrg"}
I have tried eq, match, like etc, and nothing returns any results, unless I use an *, which gives me everything.
I found that the Organization property is looking for type Veeam.Archiver.PowerShell.Cmdlets.DataManagement.VBOOrganizationData, so I went ahead and did this:
$org2 = Get-VBOEntityData -Type Organization -Repository $repo | Where-Object {$_.Displayname -eq "MyOrg"}
$users | Where-Object {$_.Organization -match "$org2"} (also tried all the other comparison parameters).
I still get no output. I'm stuck. Any input?
I've got some untested lines of script that will then recursively delete all the data I need, but if anyone wants to throw their suggestions out on that before I beat my ahead against another unforseen issue after this one, that would be super

P.S. - I also tried pulling users with Get-VBOOrganizationUser -Organization $org, and while that works to pull the users, it's the wrong variable type to pass onto the remove-vboentitydata command.