I’m trying to delete some user to data to free up licences and it seems to be taking forever to complete. I’m testing with a user who only has a few 100 emails but the command seems to have hung up. Here is the relevant part of the script:
$RepositoryName = 'My_M365Repository'
$UsersToRemove = @(
$Repository = Get-VBORepository -Name $RepositoryName
foreach($UserToRemove in $UsersToRemove)
$UserData = Get-VBOEntityData -Type 'User' -Repository $Repository -Name $UserToRemove
'No user data found'
# Use $UserData to see which backup types exist, and then only remove those.
Write-Host 'Removing Mailbox data'
Remove-VBOEntityData -Repository $Repository -User $UserData -Mailbox -Confirm:$false
Any idea if I’m doing something wrong, or that cmdlet really does just take ages?