also get paths from newer plan format
This commit is contained in:
@@ -73,16 +73,33 @@ ForEach ( $plan in $BackupPlans ) {
|
||||
[System.Collections.Hashtable]$FilteredFiles = @{}
|
||||
[System.Collections.Hashtable]$IncludedFiles = @{}
|
||||
|
||||
# Get all included items
|
||||
ForEach ( $obj in $plan.Items ) {
|
||||
ForEach ( $path in $obj.PlanItem.Path ) {
|
||||
# Get all included items from older plan format
|
||||
If ( $null -ne $plan.Items ) {
|
||||
ForEach ( $obj in $plan.Items ) {
|
||||
ForEach ( $path in $obj.PlanItem.Path ) {
|
||||
Use-Path -List $IncludedPaths -Path $path
|
||||
}
|
||||
}
|
||||
}
|
||||
# Get all included items from newer plan format
|
||||
If ( $null -ne $plan.BackupItem ) {
|
||||
ForEach ( $path in $plan.BackupItem ) {
|
||||
Use-Path -List $IncludedPaths -Path $path
|
||||
}
|
||||
}
|
||||
|
||||
# Get all excluded items from older plan format
|
||||
If ( $null -ne $plan.ExcludedItems ) {
|
||||
ForEach ( $obj in $plan.ExcludedItems ) {
|
||||
ForEach ( $path in $obj.PlanItem.Path ) {
|
||||
Use-Path -List $ExcludedPaths -Path $path
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Get all excluded items
|
||||
ForEach ( $obj in $plan.ExcludedItems ) {
|
||||
ForEach ( $path in $obj.PlanItem.Path ) {
|
||||
# Get all excluded items from newer plan format
|
||||
If ( $null -ne $plan.ExcludeItem ) {
|
||||
ForEach ( $path in $plan.ExcludeItem ) {
|
||||
Use-Path -List $ExcludedPaths -Path $path
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user