Maintain control of your Microsoft 365 data
Post Reply
mvdijk
Novice
Posts: 3
Liked: never
Joined: Sep 05, 2024 7:35 am
Full Name: Mike van Dijk
Contact:

Error when removing site from repository

Post by mvdijk »

We use Veeam Backup for Microsoft 365 to backup our Microsoft 365 tenant.
I have noticed a lot of removed SharePoint sites are still backed up, so i tried te remove them from the repository.
I can delete some sites, but the most sites give the following error:

Code: Select all

Remove-VBOEntityData : Cannot validate argument on parameter 'Site'. The argument is null. Provide a valid value for th
e argument, and then try running the command again.
At line:1 char:52
+ Remove-VBOEntityData -Repository $repository -Site $site
+                                                    ~~~~~
    + CategoryInfo          : InvalidData: (:) [Remove-VBOEntityData], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Archiver.PowerShell.Cmdlets.BackupItems.RemoveVBO
   EntityData
I use the following commands in the PowerShell Toolkit:

Code: Select all

$repository = Get-VBORepository -Name "Default Backup Repository (D:)"
$site = Get-VBOEntityData -Type Site -Repository $repository -Name "examplesite"
Remove-VBOEntityData -Repository $repository -Site $site
Do you know how i can solve this?
Mildur
Product Manager
Posts: 10309
Liked: 2752 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Error when removing site from repository

Post by Mildur »

Hello Mike

It looks like no site information was stored in your site variable. Which means no site was found by the name you have provided.

Please make sure you have used the correct site name/url. Use the following code to check what Sharepoint Sites you have in this repository.

Code: Select all

$repository = Get-VBORepository -Name "Default Backup Repository (D:)"
Get-VBOEntityData -Type Site -Repository $repository | select title,Url,BackedUpTime
I recommend to use the URL to filter the site you want to remove from the repository.

Code: Select all

$repository = Get-VBORepository -Name "Default Backup Repository (D:)"
$site = Get-VBOEntityData -Type Site -Repository $repository -Name "https://*******.sharepoint.com/sites/name"
Remove-VBOEntityData -Repository $repository -Site $site
Best,
Fabian
Product Management Analyst @ Veeam Software
mvdijk
Novice
Posts: 3
Liked: never
Joined: Sep 05, 2024 7:35 am
Full Name: Mike van Dijk
Contact:

Re: Error when removing site from repository

Post by mvdijk »

When i try to remove a site from the repository based on the url, i get the same error.
I noticed when i executed the following command, no information is returned:
$site = Get-VBOEntityData -Type Site -Repository $repository -Name "https://*******.sharepoint.com/sites/name"
Mike Resseler
Product Manager
Posts: 8221
Liked: 1333 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Error when removing site from repository

Post by Mike Resseler »

Could you do a $site to display what it gives? I still think it is not giving you the information you need. And I do assume you are using a very specific URL for your environment and not Mildurs example :-)
mvdijk
Novice
Posts: 3
Liked: never
Joined: Sep 05, 2024 7:35 am
Full Name: Mike van Dijk
Contact:

Re: Error when removing site from repository

Post by mvdijk »

When i only do $site i'm not receiving any information.
Yes i am using a url specific to my environment.
The site i want to remove is listed when using the following command:
Get-VBOEntityData -Type Site -Repository $repository | select title,Url,BackedUpTime
When executing $site = Get-VBOEntityData -Type Site -Repository $repository -Name "https://*******.sharepoint.com/sites/name" no information is being displayed.
It's almost like the entry is non existent.
Mike Resseler
Product Manager
Posts: 8221
Liked: 1333 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Error when removing site from repository

Post by Mike Resseler »

We are probably overseeing something but I kind put my finger on it at this point in time.

I propose you log a support call so that an engineer can do a session together with you to figure out what is going on. That might make things much easier then trying to solve this through the forums.

Although I do believe that your first code is correct: ($site = Get-VBOEntityData -Type Site -Repository $repository -Name "examplesite")
Post Reply

Who is online

Users browsing this forum: No registered users and 73 guests