diff --git a/Src/Private/Get-AbrOntapEfficiencyVol.ps1 b/Src/Private/Get-AbrOntapEfficiencyVol.ps1 index 32318d1..f2e2e1f 100755 --- a/Src/Private/Get-AbrOntapEfficiencyVol.ps1 +++ b/Src/Private/Get-AbrOntapEfficiencyVol.ps1 @@ -5,7 +5,7 @@ function Get-AbrOntapEfficiencyVol { .DESCRIPTION .NOTES - Version: 0.6.7 + Version: 0.6.8 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -28,12 +28,12 @@ function Get-AbrOntapEfficiencyVol { process { try { - $Data = Get-NcVol -VserverContext $Vserver -Controller $Array | Where-Object { $_.Name -ne 'vol0' -and $_.State -eq "online" } + $Data = Get-NcVol -VserverContext $Vserver -Controller $Array | Where-Object { $_.JunctionPath -ne '/' -and $_.Name -ne 'vol0' -and $_.State -eq "online" } $OutObj = @() if ($Data) { foreach ($Item in $Data) { try { - $Saving = Get-NcEfficiency -Volume $Item.Name -Controller $Array + $Saving = Get-NcEfficiency -Volume $Item.Name -Vserver $Vserver -Controller $Array $inObj = [ordered] @{ 'Volume' = $Item.Name 'Capacity' = $Saving.Capacity | ConvertTo-FormattedNumber -Type Datasize -ErrorAction SilentlyContinue @@ -66,4 +66,4 @@ function Get-AbrOntapEfficiencyVol { end {} -} \ No newline at end of file +} diff --git a/Src/Private/Get-AbrOntapEfficiencyVolDetailed.ps1 b/Src/Private/Get-AbrOntapEfficiencyVolDetailed.ps1 index eccc500..c745d29 100755 --- a/Src/Private/Get-AbrOntapEfficiencyVolDetailed.ps1 +++ b/Src/Private/Get-AbrOntapEfficiencyVolDetailed.ps1 @@ -5,7 +5,7 @@ function Get-AbrOntapEfficiencyVolDetailed { .DESCRIPTION .NOTES - Version: 0.6.7 + Version: 0.6.8 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -33,7 +33,7 @@ function Get-AbrOntapEfficiencyVolDetailed { if ($Data) { foreach ($Item in $Data) { try { - $Saving = Get-NcEfficiency -Volume $Item.Name -Controller $Array + $Saving = Get-NcEfficiency -Volume $Item.Name -Vserver $Vserver -Controller $Array $inObj = [ordered] @{ 'Volume' = $Item.Name 'Capacity' = $Saving.Capacity | ConvertTo-FormattedNumber -Type Datasize -ErrorAction SilentlyContinue diff --git a/Src/Private/Get-AbrOntapVserverVolumeSnapshot.ps1 b/Src/Private/Get-AbrOntapVserverVolumeSnapshot.ps1 index aef488a..c074649 100755 --- a/Src/Private/Get-AbrOntapVserverVolumeSnapshot.ps1 +++ b/Src/Private/Get-AbrOntapVserverVolumeSnapshot.ps1 @@ -5,7 +5,7 @@ function Get-AbrOntapVserverVolumeSnapshot { .DESCRIPTION .NOTES - Version: 0.6.7 + Version: 0.6.8 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -33,8 +33,8 @@ function Get-AbrOntapVserverVolumeSnapshot { if ($VolumeFilter) { foreach ($Item in $VolumeFilter) { try { - $SnapReserve = Get-NcVol $Item.Name -Controller $Array | Select-Object -ExpandProperty VolumeSpaceAttributes - $SnapPolicy = Get-NcVol $Item.Name -Controller $Array | Select-Object -ExpandProperty VolumeSnapshotAttributes + $SnapReserve = Get-NcVol $Item.Name -VserverContext $Vserver -Controller $Array | Select-Object -ExpandProperty VolumeSpaceAttributes + $SnapPolicy = Get-NcVol $Item.Name -VserverContext $Vserver -Controller $Array | Select-Object -ExpandProperty VolumeSnapshotAttributes $inObj = [ordered] @{ 'Volume' = $Item.Name 'Snapshot Enabled' = ConvertTo-TextYN $SnapPolicy.AutoSnapshotsEnabled @@ -72,4 +72,4 @@ function Get-AbrOntapVserverVolumeSnapshot { end {} -} \ No newline at end of file +} diff --git a/Src/Private/Get-AbrOntapVserverVolumeSnapshotHealth.ps1 b/Src/Private/Get-AbrOntapVserverVolumeSnapshotHealth.ps1 index ffe01be..6b0dadf 100755 --- a/Src/Private/Get-AbrOntapVserverVolumeSnapshotHealth.ps1 +++ b/Src/Private/Get-AbrOntapVserverVolumeSnapshotHealth.ps1 @@ -5,7 +5,7 @@ function Get-AbrOntapVserverVolumeSnapshotHealth { .DESCRIPTION .NOTES - Version: 0.6.7 + Version: 0.6.8 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux @@ -31,7 +31,7 @@ function Get-AbrOntapVserverVolumeSnapshotHealth { $SnapshotDays = 7 $Now = Get-Date $VserverFilter = Get-NcVol -VserverContext $Vserver -Controller $Array | Where-Object { $_.JunctionPath -ne '/' -and $_.Name -ne 'vol0' } - $SnapShotData = Get-NcSnapshot -Volume $VserverFilter -Controller $Array | Where-Object { $_.Name -notmatch "snapmirror.*" -and $_.Created -le $Now.AddDays(-$SnapshotDays) } + $SnapShotData = Get-NcSnapshot -Volume $VserverFilter -Vserver $Vserver -Controller $Array | Where-Object { $_.Name -notmatch "snapmirror.*" -and $_.Created -le $Now.AddDays(-$SnapshotDays) } if ($SnapShotData) { Section -Style Heading4 "HealthCheck - Volumes Snapshot" { Paragraph "The following section provides the Vserver Volumes Snapshot HealthCheck on $($SVM)." @@ -70,4 +70,4 @@ function Get-AbrOntapVserverVolumeSnapshotHealth { end {} -} \ No newline at end of file +} diff --git a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 index a3a2f2b..d479344 100755 --- a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 @@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { .DESCRIPTION Documents the configuration of NetApp ONTAP in Word/HTML/Text formats using PScribo. .NOTES - Version: 0.6.7 + Version: 0.6.8 Author: Jonathan Colon Feliciano Twitter: @jcolonfzenpr Github: rebelinux @@ -641,8 +641,8 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { BlankLine Get-AbrOntapEfficiencyAggr foreach ($SVM in $Vservers) { - $VolFilter = Get-NcVol -VserverContext $SVM -Controller $Array | Where-Object { $_.State -eq "online" } - if (Get-NcEfficiency -Volume $VolFilter.Name -Controller $Array | Where-Object { $_.Name -ne "vol0" }) { + $VolFilter = Get-NcVol -VserverContext $SVM -Controller $Array | Where-Object { ($_.State -eq "online") -and ($_.Name -ne "vol0") } + if (Get-NcEfficiency -Volume $VolFilter.Name[0] -Vserver $SVM -Controller $Array) { Section -Style Heading4 "$SVM Vserver Volume Deduplication" { Get-AbrOntapEfficiencyVolSisStatus -Vserver $SVM Section -Style Heading5 "Volume Efficiency" {