Hi Ahmed.albatoosh,
Sure, the following code is pseudo-code, but should be all you need:
cmdlets:
Get-VBRUnstructuredBackupJob
Get-VBRUnstructuredBackup
Detach-VBRBackup
Set-VBRNasBackupJob
Basic workflow would be:
Note this is very basic structure of the code and will point all jobs to the repo you assign to variable $newRepo -- if you need to point to different repositories depending on the job, you will need to write your own logic to determine that.
Sure, the following code is pseudo-code, but should be all you need:
cmdlets:
Get-VBRUnstructuredBackupJob
Get-VBRUnstructuredBackup
Detach-VBRBackup
Set-VBRNasBackupJob
Basic workflow would be:
Code:
$uJob = Get-VBRUnstructuredBackupJob #Fetches all Unstructured backup jobs, probably you will want to filter this somehow$newRepo = Get-VBRBackupRepository -Name "Name of new Repository"Foreach($u in $uJob){$uBackup = Get-VBRUnstructuredBackup | Where-Object {$_.JobId -eq $u.id}Detach-VBRBackup -Backup $uBackupSet-VBRNasBackupJob -Job $u -ShortTermBackupRepository $newRepoDelete-Variable ubackup}Statistics: Posted by david.domask — Aug 25, 2025 8:12 am









