@@ -59,38 +59,42 @@ function Get-AbrOntapEfficiencyAggr {
5959 $Data = Get-NcAggr - Controller $Array | Where-Object {$_.AggrRaidAttributes.HasLocalRoot -ne ' True' }
6060 $Savingfilter = (Get-NcAggrEfficiency - Controller $Array | Select-Object - ExpandProperty AggrEfficiencyAdditionalDetailsInfo).NumberOfSisDisabledVolumes | Measure-Object - Sum
6161 if ($Data -and $Savingfilter.Sum -gt 0 -and $Healthcheck.Storage.Efficiency ) {
62- Section - Style Heading4 ' HealthCheck - Volume with Disabled Deduplication' {
63- Paragraph " The following section provides the Volume efficiency healthcheck Information on $ ( $ClusterInfo.ClusterName ) ."
64- BlankLine
65- $OutObj = @ ()
66- foreach ($Item in $Data ) {
67- try {
68- $Saving = Get-NcAggrEfficiency - Aggregate $Item.Name - Controller $Array | Select-Object - ExpandProperty AggrEfficiencyAdditionalDetailsInfo
69- $VolInAggr = Get-NcVol - Aggregate $Item.Name - Controller $Array
70- $VolFilter = $VolInAggr | Where-Object { $_.VolumeSisAttributes.IsSisStateEnabled -ne " True" }
62+ $OutObj = @ ()
63+ foreach ($Item in $Data ) {
64+ try {
65+ $Saving = (Get-NcAggrEfficiency - Aggregate $Item.Name - Controller $Array | Select-Object - ExpandProperty AggrEfficiencyAdditionalDetailsInfo).NumberOfSisDisabledVolumes
66+ $VolInAggr = Get-NcVol - Aggregate $Item.Name - Controller $Array | Where-Object {$_.VolumeStateAttributes.IsVserverRoot -ne ' True' }
67+ $VolFilter = $VolInAggr | Where-Object { $_.VolumeSisAttributes.IsSisStateEnabled -ne " True" }
68+ if ($Saving -ne 0 -and $VolFilter ) {
7169 $inObj = [ordered ] @ {
7270 ' Aggregate' = $Item.Name
73- ' Volumes without Deduplication' = $VolFilter.Name
71+ ' Volumes without Deduplication' = $VolFilter.Name -join " , "
7472 }
7573 $OutObj += [pscustomobject ]$inobj
7674 }
77- catch {
78- Write-PscriboMessage - IsWarning $_.Exception.Message
79- }
8075 }
81-
82- if ($Healthcheck.Storage.Efficiency ) {
83- $OutObj | Set-Style - Style Warning - Property ' Aggregate' , ' Volumes without Deduplication'
76+ catch {
77+ Write-PscriboMessage - IsWarning $_.Exception.Message
8478 }
79+ }
8580
86- $TableParams = @ {
87- Name = " HealthCheck - Volume without deduplication - $ ( $ClusterInfo.ClusterName ) "
88- List = $false
89- ColumnWidths = 45 , 55
90- }
91- if ($Report.ShowTableCaptions ) {
92- $TableParams [' Caption' ] = " - $ ( $TableParams.Name ) "
93- }
81+ if ($Healthcheck.Storage.Efficiency ) {
82+ $OutObj | Set-Style - Style Warning - Property ' Aggregate' , ' Volumes without Deduplication'
83+ }
84+
85+ $TableParams = @ {
86+ Name = " HealthCheck - Volume without deduplication - $ ( $ClusterInfo.ClusterName ) "
87+ List = $false
88+ ColumnWidths = 45 , 55
89+ }
90+ if ($Report.ShowTableCaptions ) {
91+ $TableParams [' Caption' ] = " - $ ( $TableParams.Name ) "
92+ }
93+ }
94+ if ($OutObj ) {
95+ Section - Style Heading4 ' HealthCheck - Volume with Disabled Deduplication' {
96+ Paragraph " The following section provides the Volume efficiency healthcheck Information on $ ( $ClusterInfo.ClusterName ) ."
97+ BlankLine
9498 $OutObj | Table @TableParams
9599 }
96100 }
0 commit comments