From 70aca302a8f9cdf1da6c10d6897d190ebb82089f Mon Sep 17 00:00:00 2001 From: David Yoder Date: Fri, 23 Feb 2024 15:43:59 -0500 Subject: [PATCH] work with RAW backup plan --- Get-BackupCapacityPlanningData.ps1 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Get-BackupCapacityPlanningData.ps1 b/Get-BackupCapacityPlanningData.ps1 index ed2f6a6..9d276c6 100644 --- a/Get-BackupCapacityPlanningData.ps1 +++ b/Get-BackupCapacityPlanningData.ps1 @@ -31,11 +31,11 @@ Function Use-Path { } # Import MSP360 module -Import-MSP360Module -#Import-Module MSP360 +#Import-MSP360Module +Import-Module MSP360 # Get all backup plans -$BackupPlans = Get-MBSBackupPlan -OutputType Full +$BackupPlans = Get-MBSBackupPlan -OutputType Raw | Where-Object { $_.Name -eq "TestPlan" } # Iterate over all backup plans ForEach ( $plan in $BackupPlans ) { @@ -82,12 +82,12 @@ ForEach ( $plan in $BackupPlans ) { } } } - # 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 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 ) { @@ -98,12 +98,12 @@ ForEach ( $plan in $BackupPlans ) { } } - # Get all excluded items from newer plan format - If ( $null -ne $plan.ExcludeItem ) { - ForEach ( $path in $plan.ExcludeItem ) { - 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 ) {