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]$FilteredFiles = @{}
|
||||||
[System.Collections.Hashtable]$IncludedFiles = @{}
|
[System.Collections.Hashtable]$IncludedFiles = @{}
|
||||||
|
|
||||||
# Get all included items
|
# Get all included items from older plan format
|
||||||
ForEach ( $obj in $plan.Items ) {
|
If ( $null -ne $plan.Items ) {
|
||||||
ForEach ( $path in $obj.PlanItem.Path ) {
|
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
|
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
|
# Get all excluded items from newer plan format
|
||||||
ForEach ( $obj in $plan.ExcludedItems ) {
|
If ( $null -ne $plan.ExcludeItem ) {
|
||||||
ForEach ( $path in $obj.PlanItem.Path ) {
|
ForEach ( $path in $plan.ExcludeItem ) {
|
||||||
Use-Path -List $ExcludedPaths -Path $path
|
Use-Path -List $ExcludedPaths -Path $path
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user