#this is generic script, Please change the following variables according to you need #this script is created by imtiaz_alum@protechbyte.com #If you face any issue feel free to write me. #Uncomment whichever code you want to run #If you are storing backups of different repository then you need enter correct name of each repository like onedrive is backed up on another repo and mail is on another repo #Variables that needs to be adjusted: $origanization_name = "DOMAIN.onmicrosoft.com" $repository_name = "Default Backup Repository" #$reporsitory_sharepoint = "" #$repository_onedrive = "" $user1 = "USER@DOMAIN.com" #Standard Script No change required: $org = Get-VBOOrganization -Name $origanization_name $repository = Get-VBORepository -Name $repository_name #Check if data exists: #$repository = Get-VBORepository -Name $repository_name #$user = Get-VBOEntityData -Type User -Repository $repository -Name $user1 #echo $user #Remove Mailbox data: #$user = Get-VBOEntityData -Type User -Repository $repository -Name $user1 #Remove-VBOEntityData -Repository $repository -User $user -Mailbox -ArchiveMailbox -OneDrive -Sites #Check Sharepoint Data: #$Repository = Get-VBORepository -Name $repository_name #Get-VBOEntityData -Type site -Repository $Repository | sort-object Title #Remove Sharepoint Data if exists: #$Repository = Get-VBORepository -Name $repository_name #$Site = Get-VBOEntityData -Type site -Repository $Repository -name "TITLE" #Remove-VBOEntityData -Repository $Repository -Site -OneDrive $Site #Y will accept the deleting of data #Remove Onedrive Backup files #$repository = Get-VBORepository -Name $repository_name #$user = Get-VBOEntityData -Type User -Repository $repository -Name "TITLE" #Remove-VBOEntityData -Repository $repository -User $user -OneDrive #Y will accept the deleting of data #Remove License from Veeam Usage: #$licensedUser = Get-VBOLicensedUser -Organization $org -Name $user1 #Remove-VBOLicensedUser -User $licensedUser #Check VBO console to verify the license is removed.