also get paths from newer plan format
This commit is contained in:
@@ -73,19 +73,36 @@ ForEach ( $plan in $BackupPlans ) {
|
||||
[System.Collections.Hashtable]$FilteredFiles = @{}
|
||||
[System.Collections.Hashtable]$IncludedFiles = @{}
|
||||
|
||||
# Get all included items
|
||||
# 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
|
||||
# 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 from newer plan format
|
||||
If ( $null -ne $plan.ExcludeItem ) {
|
||||
ForEach ( $path in $plan.ExcludeItem ) {
|
||||
Use-Path -List $ExcludedPaths -Path $path
|
||||
}
|
||||
}
|
||||
|
||||
# Print all paths in $IncludedPaths
|
||||
If ( $IncludedPaths.Length -gt 0 ) {
|
||||
|
||||
Reference in New Issue
Block a user