Maintain control of your Microsoft Office 365 email data
Post Reply
Frank_190
Novice
Posts: 6
Liked: never
Joined: Feb 21, 2017 9:47 pm
Full Name: Frank Pisano
Contact:

Powershell Error with Remove-VBOEntityData

Post by Frank_190 » Dec 06, 2018 10:46 pm

I am trying to remove some former employees from my Office 365 repository via PowerShell. I opened a support ticket, 03315036, and they say they don't help on powershell scripts. I am running into the following error.

PS X:\Backup> $user = Get-VBOEntityData -Type User -Repository $repository -Name "John Doe"
PS X:\Backup> Remove-VBOEntityData -Repository $repository -User $user -Mailbox -ArchiveMailbox -OneDrive -Sites -WhatIF

Remove-VBOEntityData : Cannot convert 'System.Object[]' to the type
'Veeam.Archiver.PowerShell.Cmdlets.DataManagement.VBOUserData' required by parameter 'User'. Specified method is not
supported.
At line:1 char:52
+ Remove-VBOEntityData -Repository $repository -User $user -Mailbox -ArchiveMailbo ...
+ ~~~~~
+ CategoryInfo : InvalidArgument: (:) [Remove-VBOEntityData], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,Veeam.Archiver.PowerShell.Cmdlets.BackupItems.RemoveVBOEntityData



What I think is the issue is that we have for most older employees, two entries when we issue the following command:
$user = Get-VBOEntityData -Type User -Repository $repository -Name "John Doe"

If I do a write $user I will get the output twice on an older employee, but on a brand new employee, I only get one group of returns.

Any suggestions on what might be causing this error?

Thank you

nielsengelen
Veeam Software
Posts: 2646
Liked: 545 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Powershell Error with Remove-VBOEntityData

Post by nielsengelen » Dec 07, 2018 9:05 am 1 person likes this post

Can you try the following (I don't have double entries so I can't test it):

Code: Select all

$users = Get-VBOEntityData -Type User -Repository $repository -Name "John Doe"

foreach ($user in $users) {
   Remove-VBOEntityData -Repository $repository -User $user -Mailbox -ArchiveMailbox -OneDrive -Sites -WhatIF
}
VCP-DCV
Veeam Certified Architect (VMCA)
http://foonet.be

Frank_190
Novice
Posts: 6
Liked: never
Joined: Feb 21, 2017 9:47 pm
Full Name: Frank Pisano
Contact:

Re: Powershell Error with Remove-VBOEntityData

Post by Frank_190 » Dec 07, 2018 4:01 pm

That did the trick! Thank you very much for the help.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest