diff --git a/AsBuiltReport.NetApp.ONTAP.json b/AsBuiltReport.NetApp.ONTAP.json index ec53809..962878e 100755 --- a/AsBuiltReport.NetApp.ONTAP.json +++ b/AsBuiltReport.NetApp.ONTAP.json @@ -18,9 +18,9 @@ "DisableDiagramMainLogo": false, "DiagramTheme": "White", "DiagramWaterMark": "", - "ExportDiagrams": false, + "ExportDiagrams": true, "ExportDiagramsFormat": [ - "png" + "pdf" ], "EnableDiagramSignature": false, "DiagramColumnSize": 4, diff --git a/CHANGELOG.md b/CHANGELOG.md index 083265c..fe5e12d 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump Diagrammer.Core module requirement to v0.2.36 - Bump module version to v0.6.12 - Update github actions to use latest version +- Export diagrams by default ### Fixed @@ -31,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix model property assignment in Get-AbrOntapStorageAggrDiagram function - Fix Volume SnapShot Configuration section showing healthcheck for non violated item - Fix CodeQL analysis issues 27 +- Fix diagram size not respecting document border size ### Removed diff --git a/Src/Bin/Assemblies/net90/linux-x64/AsBuiltReportChart.dll b/Src/Bin/Assemblies/net90/linux-x64/AsBuiltReportChart.dll deleted file mode 100644 index 9d66ea2..0000000 Binary files a/Src/Bin/Assemblies/net90/linux-x64/AsBuiltReportChart.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/linux-x64/HarfBuzzSharp.dll b/Src/Bin/Assemblies/net90/linux-x64/HarfBuzzSharp.dll deleted file mode 100755 index ee75381..0000000 Binary files a/Src/Bin/Assemblies/net90/linux-x64/HarfBuzzSharp.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/linux-x64/ScottPlot.dll b/Src/Bin/Assemblies/net90/linux-x64/ScottPlot.dll deleted file mode 100755 index 2eaec68..0000000 Binary files a/Src/Bin/Assemblies/net90/linux-x64/ScottPlot.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/linux-x64/SkiaSharp.HarfBuzz.dll b/Src/Bin/Assemblies/net90/linux-x64/SkiaSharp.HarfBuzz.dll deleted file mode 100755 index 362cbf4..0000000 Binary files a/Src/Bin/Assemblies/net90/linux-x64/SkiaSharp.HarfBuzz.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/linux-x64/SkiaSharp.dll b/Src/Bin/Assemblies/net90/linux-x64/SkiaSharp.dll deleted file mode 100755 index 40b5f96..0000000 Binary files a/Src/Bin/Assemblies/net90/linux-x64/SkiaSharp.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/linux-x64/libHarfBuzzSharp.so b/Src/Bin/Assemblies/net90/linux-x64/libHarfBuzzSharp.so deleted file mode 100755 index 2d442dc..0000000 Binary files a/Src/Bin/Assemblies/net90/linux-x64/libHarfBuzzSharp.so and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/linux-x64/libSkiaSharp.so b/Src/Bin/Assemblies/net90/linux-x64/libSkiaSharp.so deleted file mode 100755 index 4b81dc9..0000000 Binary files a/Src/Bin/Assemblies/net90/linux-x64/libSkiaSharp.so and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-arm64/AsBuiltReportChart.dll b/Src/Bin/Assemblies/net90/osx-arm64/AsBuiltReportChart.dll deleted file mode 100644 index ed2697c..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-arm64/AsBuiltReportChart.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-arm64/HarfBuzzSharp.dll b/Src/Bin/Assemblies/net90/osx-arm64/HarfBuzzSharp.dll deleted file mode 100755 index ee75381..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-arm64/HarfBuzzSharp.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-arm64/ScottPlot.dll b/Src/Bin/Assemblies/net90/osx-arm64/ScottPlot.dll deleted file mode 100755 index 2eaec68..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-arm64/ScottPlot.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-arm64/SkiaSharp.HarfBuzz.dll b/Src/Bin/Assemblies/net90/osx-arm64/SkiaSharp.HarfBuzz.dll deleted file mode 100755 index 362cbf4..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-arm64/SkiaSharp.HarfBuzz.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-arm64/SkiaSharp.dll b/Src/Bin/Assemblies/net90/osx-arm64/SkiaSharp.dll deleted file mode 100755 index 40b5f96..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-arm64/SkiaSharp.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-arm64/libHarfBuzzSharp.dylib b/Src/Bin/Assemblies/net90/osx-arm64/libHarfBuzzSharp.dylib deleted file mode 100755 index 3305506..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-arm64/libHarfBuzzSharp.dylib and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-arm64/libSkiaSharp.dylib b/Src/Bin/Assemblies/net90/osx-arm64/libSkiaSharp.dylib deleted file mode 100755 index fcde75a..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-arm64/libSkiaSharp.dylib and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-x64/AsBuiltReportChart.dll b/Src/Bin/Assemblies/net90/osx-x64/AsBuiltReportChart.dll deleted file mode 100644 index 52f6f74..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-x64/AsBuiltReportChart.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-x64/HarfBuzzSharp.dll b/Src/Bin/Assemblies/net90/osx-x64/HarfBuzzSharp.dll deleted file mode 100755 index ee75381..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-x64/HarfBuzzSharp.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-x64/ScottPlot.dll b/Src/Bin/Assemblies/net90/osx-x64/ScottPlot.dll deleted file mode 100755 index 2eaec68..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-x64/ScottPlot.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-x64/SkiaSharp.HarfBuzz.dll b/Src/Bin/Assemblies/net90/osx-x64/SkiaSharp.HarfBuzz.dll deleted file mode 100755 index 362cbf4..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-x64/SkiaSharp.HarfBuzz.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-x64/SkiaSharp.dll b/Src/Bin/Assemblies/net90/osx-x64/SkiaSharp.dll deleted file mode 100755 index 40b5f96..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-x64/SkiaSharp.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-x64/libHarfBuzzSharp.dylib b/Src/Bin/Assemblies/net90/osx-x64/libHarfBuzzSharp.dylib deleted file mode 100755 index 3305506..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-x64/libHarfBuzzSharp.dylib and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/osx-x64/libSkiaSharp.dylib b/Src/Bin/Assemblies/net90/osx-x64/libSkiaSharp.dylib deleted file mode 100755 index fcde75a..0000000 Binary files a/Src/Bin/Assemblies/net90/osx-x64/libSkiaSharp.dylib and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/win-x64/AsBuiltReportChart.dll b/Src/Bin/Assemblies/net90/win-x64/AsBuiltReportChart.dll deleted file mode 100644 index b59036d..0000000 Binary files a/Src/Bin/Assemblies/net90/win-x64/AsBuiltReportChart.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/win-x64/HarfBuzzSharp.dll b/Src/Bin/Assemblies/net90/win-x64/HarfBuzzSharp.dll deleted file mode 100755 index ee75381..0000000 Binary files a/Src/Bin/Assemblies/net90/win-x64/HarfBuzzSharp.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/win-x64/ScottPlot.dll b/Src/Bin/Assemblies/net90/win-x64/ScottPlot.dll deleted file mode 100755 index 2eaec68..0000000 Binary files a/Src/Bin/Assemblies/net90/win-x64/ScottPlot.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/win-x64/SkiaSharp.HarfBuzz.dll b/Src/Bin/Assemblies/net90/win-x64/SkiaSharp.HarfBuzz.dll deleted file mode 100755 index 362cbf4..0000000 Binary files a/Src/Bin/Assemblies/net90/win-x64/SkiaSharp.HarfBuzz.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/win-x64/SkiaSharp.dll b/Src/Bin/Assemblies/net90/win-x64/SkiaSharp.dll deleted file mode 100755 index 40b5f96..0000000 Binary files a/Src/Bin/Assemblies/net90/win-x64/SkiaSharp.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/win-x64/libHarfBuzzSharp.dll b/Src/Bin/Assemblies/net90/win-x64/libHarfBuzzSharp.dll deleted file mode 100755 index 2bb6849..0000000 Binary files a/Src/Bin/Assemblies/net90/win-x64/libHarfBuzzSharp.dll and /dev/null differ diff --git a/Src/Bin/Assemblies/net90/win-x64/libSkiaSharp.dll b/Src/Bin/Assemblies/net90/win-x64/libSkiaSharp.dll deleted file mode 100755 index 036745b..0000000 Binary files a/Src/Bin/Assemblies/net90/win-x64/libSkiaSharp.dll and /dev/null differ diff --git a/Src/Private/Export-AbrOntapDiagram.ps1 b/Src/Private/Export-AbrOntapDiagram.ps1 index eab9f82..b06b440 100644 --- a/Src/Private/Export-AbrOntapDiagram.ps1 +++ b/Src/Private/Export-AbrOntapDiagram.ps1 @@ -122,10 +122,9 @@ function Export-AbrOntapDiagram { $Graph = $DiagramObject $Diagram = New-Diagrammer @DiagramParams -InputObject $Graph if ($Diagram) { - if ((Get-DiaImagePercent -GraphObj $Diagram).Width -gt 600) { $ImagePrty = 40 } else { $ImagePrty = 30 } + $BestAspectRatio = Get-DiaBestImageAspectRatio -GraphObj $Diagram -MaxWidth 600 Section -Style Heading2 $MainDiagramLabel { - Image -Base64 $Diagram -Text 'NetApp Ontap Diagram' -Percent $ImagePrty -Align Center - Paragraph 'Image preview: Opens the image in a new tab to view it at full resolution.' -Tabs 2 + Image -Base64 $Diagram -Text 'NetApp Ontap Diagram' -Width $BestAspectRatio.Width -Height $BestAspectRatio.Height -Align Center } } } catch { diff --git a/Src/Private/Get-AbrOntapClusterASUP.ps1 b/Src/Private/Get-AbrOntapClusterASUP.ps1 index 6dfdf83..91d79cd 100755 --- a/Src/Private/Get-AbrOntapClusterASUP.ps1 +++ b/Src/Private/Get-AbrOntapClusterASUP.ps1 @@ -35,35 +35,66 @@ function Get-AbrOntapClusterASUP { 'Enabled' = $NodesAUTO.IsEnabled 'Last Time Stamp' = $NodesAUTO.LastTimestampDT 'Last Subject' = $NodesAUTO.LastSubject + 'Ondemand Server URL' = $NodesAUTO.OndemandServerUrl + 'Validate Digital Certificate' = $NodesAUTO.ValidateDigitalCertificate + 'Ondemand Remote Diagnostic Enabled' = $NodesAUTO.IsOndemandRemoteDiagEnabled + 'Performance Data Enabled' = $NodesAUTO.IsPerfDataEnabled + 'Private Data Removed' = $NodesAUTO.IsPrivateDataRemoved + 'Support Enabled' = $NodesAUTO.IsSupportEnabled } - $Outobj = [pscustomobject](ConvertTo-HashToYN $inObj) + $Outobj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($Healthcheck.Cluster.AutoSupport) { $Outobj | Where-Object { $_.'Enabled' -like 'No' } | Set-Style -Style Warning -Property 'Enabled' } - - $TableParams = @{ - Name = "Cluster AutoSupport Status - $($NodesAUTO.NodeName)" - List = $true - ColumnWidths = 25, 75 - } - if ($Report.ShowTableCaptions) { - $TableParams['Caption'] = "- $($TableParams.Name)" - } - $Outobj | Table @TableParams - if ($Healthcheck.Cluster.AutoSupport -and ($Outobj | Where-Object { $_.'Enabled' -like 'No' })) { - Paragraph 'Health Check:' -Bold -Underline - BlankLine - Paragraph { - Text 'Best Practice:' -Bold - Text 'AutoSupport is disabled on one or more nodes. It is recommended to enable AutoSupport to ensure proactive monitoring and issue resolution.' - } - BlankLine - } } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } } + if ($InfoLevel.Storage -ge 2) { + foreach ($NodesAUTO in $Outobj) { + Section -Style NOTOCHeading4 -ExcludeFromTOC "$($NodesAUTO.'Node Name')" { + $TableParams = @{ + Name = "Cluster AutoSupport Status - $($NodesAUTO.'Node Name')" + List = $true + ColumnWidths = 40, 60 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $NodesAUTO | Table @TableParams + if ($Healthcheck.Cluster.AutoSupport -and ($NodesAUTO | Where-Object { $_.'Enabled' -like 'No' })) { + Paragraph 'Health Check:' -Bold -Underline + BlankLine + Paragraph { + Text 'Best Practice:' -Bold + Text 'AutoSupport is disabled on one or more nodes. It is recommended to enable AutoSupport to ensure proactive monitoring and issue resolution.' + } + BlankLine + } + } + } + } else { + $TableParams = @{ + Name = "Cluster AutoSupport Status - $($ClusterInfo.ClusterName)" + List = $false + Columns = 'Node Name', 'Protocol', 'Enabled' + ColumnWidths = 40, 30, 30 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $Outobj | Table @TableParams + if ($Healthcheck.Cluster.AutoSupport -and ($Outobj | Where-Object { $_.'Enabled' -like 'No' })) { + Paragraph 'Health Check:' -Bold -Underline + BlankLine + Paragraph { + Text 'Best Practice:' -Bold + Text 'AutoSupport is disabled on one or more nodes. It is recommended to enable AutoSupport to ensure proactive monitoring and issue resolution.' + } + BlankLine + } + } } } catch { Write-PScriboMessage -IsWarning $_.Exception.Message diff --git a/Src/Private/Get-AbrOntapClusterHA.ps1 b/Src/Private/Get-AbrOntapClusterHA.ps1 index 11ece46..212d6f6 100755 --- a/Src/Private/Get-AbrOntapClusterHA.ps1 +++ b/Src/Private/Get-AbrOntapClusterHA.ps1 @@ -32,55 +32,124 @@ function Get-AbrOntapClusterHA { $ClusterHa = Get-NcClusterHa -Node $Nodes.Node -Controller $Array $inObj = [ordered] @{ 'Name' = $Nodes.Node + 'NVRAM ID' = $Nodes.NodeNvramId + 'Local Mailbox Disks' = ($ClusterHa.LocalMailboxDisks | ForEach-Object { $_.Name }) -join ', ' 'Partner' = $ClusterHa.Partner ?? '--' + 'Partner NVRAM ID' = $ClusterHa.PartnerNvramId + 'Partner Mailbox Disks' = ($ClusterHa.PartnerMailboxDisks | ForEach-Object { $_.Name }) -join ', ' 'TakeOver Possible' = $ClusterHa.TakeoverPossible + 'TakeOver By Partner Possible' = $ClusterHa.TakeoverByPartnerPossible 'TakeOver State' = $ClusterHa.TakeoverState ?? '--' 'HA Mode' = $ClusterHa.CurrentMode + 'HA Type' = $ClusterHa.HaType 'HA State' = $ClusterHa.State + 'Interconnect Type' = $ClusterHa.InterconnectType + 'Interconnect Links' = $ClusterHa.InterconnectLinks + 'Is Enabled' = $ClusterHa.IsEnabled } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } } + if ($Healthcheck.Cluster.HA) { $OutObj | Where-Object { $_.'TakeOver State' -like 'in_takeover' } | Set-Style -Style Warning -Property 'TakeOver State' $OutObj | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' } | Set-Style -Style Warning -Property 'HA State' $OutObj | Where-Object { $_.'TakeOver Possible' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' } | Set-Style -Style Warning -Property 'TakeOver Possible' - } + $OutObj | Where-Object { $_.'TakeOver By Partner Possible' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' } | Set-Style -Style Warning -Property 'TakeOver By Partner Possible' + $OutObj | Where-Object { $_.'Is Enabled' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' } | Set-Style -Style Warning -Property 'Is Enabled' - $TableParams = @{ - Name = "Cluster HA Status - $($ClusterInfo.ClusterName)" - List = $false - ColumnWidths = 20, 20, 11, 19, 10, 20 } - if ($Report.ShowTableCaptions) { - $TableParams['Caption'] = "- $($TableParams.Name)" - } - $OutObj | Table @TableParams - if ($Healthcheck.Cluster.HA -and (($OutObj | Where-Object { $_.'TakeOver State' -like 'in_takeover' } ) -or ($OutObj | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) -or ($OutObj | Where-Object { $_.'TakeOver Possible' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' }))) { - Paragraph 'Health Check:' -Bold -Underline - BlankLine - if ($OutObj | Where-Object { $_.'TakeOver State' -like 'in_takeover' }) { - Paragraph { - Text 'Best Practice:' -Bold - Text 'One or more nodes are currently in takeover state. It is recommended to investigate the cause of the takeover and ensure that the affected node is restored to normal operation as soon as possible.' + + if ($InfoLevel.Cluster -ge 2) { + foreach ($NodeHa in $OutObj) { + Section -Style NOTOCHeading4 -ExcludeFromTOC "$($NodeHa.Name)" { + $TableParams = @{ + Name = "Cluster HA Status - $($NodeHa.Name)" + List = $true + ColumnWidths = 40, 60 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $NodeHa | Table @TableParams + if ($Healthcheck.Cluster.HA -and (($NodeHa | Where-Object { $_.'TakeOver State' -like 'in_takeover' } ) -or ($NodeHa | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) -or ($NodeHa | Where-Object { $_.'TakeOver Possible' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' }))) { + Paragraph 'Health Check:' -Bold -Underline + BlankLine + if ($NodeHa | Where-Object { $_.'TakeOver State' -like 'in_takeover' }) { + Paragraph { + Text 'Best Practice:' -Bold + Text 'One or more nodes are currently in takeover state. It is recommended to investigate the cause of the takeover and ensure that the affected node is restored to normal operation as soon as possible.' + } + BlankLine + } + if ($NodeHa | Where-Object { $_.'TakeOver Possible' -eq 'No' }) { + Paragraph { + Text 'Best Practice:' -Bold + Text 'One or more nodes have takeover capability disabled. It is recommended to enable storage failover capability to ensure high availability in case of node failures.' + } + BlankLine + } + if ($NodeHa | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) { + Paragraph { + Text 'Best Practice:' -Bold + Text 'One or more nodes are operating in HA mode and are not connected. It is recommended to verify the HA configuration and connectivity to ensure high availability is properly set up.' + } + BlankLine + } + if ($NodeHa | Where-Object { $_.'Is Enabled' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' }) { + Paragraph { + Text 'Best Practice:' -Bold + Text 'One or more nodes have HA disabled while operating in HA mode. It is recommended to enable HA to ensure redundancy and high availability.' + } + BlankLine + } + } } - BlankLine } - if ($OutObj | Where-Object { $_.'TakeOver Possible' -eq 'No' }) { - Paragraph { - Text 'Best Practice:' -Bold - Text 'One or more nodes have takeover capability disabled. It is recommended to enable storage failover capability to ensure high availability in case of node failures.' - } - BlankLine + } else { + $TableParams = @{ + Name = "Cluster AutoSupport Status - $($ClusterInfo.ClusterName)" + List = $false + Columns = 'Name', 'Partner', 'TakeOver Possible', 'TakeOver State', 'HA Mode', 'HA State' + ColumnWidths = 20, 20, 11, 19, 10, 20 } - if ($OutObj | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) { - Paragraph { - Text 'Best Practice:' -Bold - Text 'One or more nodes are operating in HA mode and are not connected. It is recommended to verify the HA configuration and connectivity to ensure high availability is properly set up.' - } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $Outobj | Table @TableParams + if ($Healthcheck.Cluster.HA -and (($Outobj | Where-Object { $_.'TakeOver State' -like 'in_takeover' } ) -or ($Outobj | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) -or ($Outobj | Where-Object { $_.'TakeOver Possible' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' }))) { + Paragraph 'Health Check:' -Bold -Underline BlankLine + if ($Outobj | Where-Object { $_.'TakeOver State' -like 'in_takeover' }) { + Paragraph { + Text 'Best Practice:' -Bold + Text 'One or more nodes are currently in takeover state. It is recommended to investigate the cause of the takeover and ensure that the affected node is restored to normal operation as soon as possible.' + } + BlankLine + } + if ($Outobj | Where-Object { $_.'TakeOver Possible' -eq 'No' }) { + Paragraph { + Text 'Best Practice:' -Bold + Text 'One or more nodes have takeover capability disabled. It is recommended to enable storage failover capability to ensure high availability in case of node failures.' + } + BlankLine + } + if ($Outobj | Where-Object { $_.'HA Mode' -ne 'non_ha' -and $_.'HA State' -notlike 'connected' }) { + Paragraph { + Text 'Best Practice:' -Bold + Text 'One or more nodes are operating in HA mode and are not connected. It is recommended to verify the HA configuration and connectivity to ensure high availability is properly set up.' + } + BlankLine + } + if ($Outobj | Where-Object { $_.'Is Enabled' -eq 'No' -and $_.'HA Mode' -ne 'non_ha' }) { + Paragraph { + Text 'Best Practice:' -Bold + Text 'One or more nodes have HA disabled while operating in HA mode. It is recommended to enable HA to ensure redundancy and high availability.' + } + BlankLine + } } } } diff --git a/Src/Private/Get-AbrOntapDiskInv.ps1 b/Src/Private/Get-AbrOntapDiskInv.ps1 index 055a428..d7a2955 100755 --- a/Src/Private/Get-AbrOntapDiskInv.ps1 +++ b/Src/Private/Get-AbrOntapDiskInv.ps1 @@ -30,39 +30,63 @@ function Get-AbrOntapDiskInv { $OutObj = @() foreach ($Disks in $DiskInv) { try { - $DiskType = Get-NcDisk -Controller $Array -Name $Disks.Name | ForEach-Object { $_.OutObjInfo } - $DiskFailed = $NodeDiskBroken | Where-Object { $_.'Name' -eq $Disks.Name } - if ($DiskFailed.Name -eq $Disks.Name ) { - $Disk = " $($DiskFailed.Name)(*)" - } else { - $Disk = $Disks.Name - } + $DiskType = Get-NcDisk -Controller $Array -Name $Disks.Name | ForEach-Object { $_.DiskInventoryInfo } $inObj = [ordered] @{ - 'Disk Name' = $Disk + 'Disk Name' = $Disks.Name 'Shelf' = $Disks.Shelf 'Bay' = $Disks.Bay - 'Capacity' = ($Disks.Capacity | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Disksize) ?? '--' + 'Capacity' = ($Disks.Capacity | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Disksize) ?? '--' 'Model' = $Disks.Model 'Serial Number' = $DiskType.SerialNumber + 'Firmware' = $Disks.FW 'Type' = $DiskType.DiskType + 'Aggregate' = $Disks.Aggregate } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } } + if ($Healthcheck.Storage.DiskStatus) { $OutObj | Where-Object { $_.'Disk Name' -like '*(*)' } | Set-Style -Style Critical -Property 'Disk Name' } - $TableParams = @{ - Name = "Disk Inventory - $($ClusterInfo.ClusterName)" - List = $false - ColumnWidths = 15, 10, 10, 10, 25, 18, 12 - } - if ($Report.ShowTableCaptions) { - $TableParams['Caption'] = "- $($TableParams.Name)" + + if ($InfoLevel.Storage -ge 2) { + foreach ($Disks in $Outobj) { + Section -Style NOTOCHeading4 -ExcludeFromTOC "$($Disks.'Disk Name')" { + $TableParams = @{ + Name = "Disk Inventory - $($Disks.'Disk Name')" + List = $true + ColumnWidths = 40, 60 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $Disks | Select-Object -ExcludeProperty 'Disk Name' | Table @TableParams + if ($Healthcheck.Cluster.AutoSupport -and ($Disks | Where-Object { $_.'Enabled' -like 'No' })) { + Paragraph 'Health Check:' -Bold -Underline + BlankLine + Paragraph { + Text 'Best Practice:' -Bold + Text 'AutoSupport is disabled on one or more nodes. It is recommended to enable AutoSupport to ensure proactive monitoring and issue resolution.' + } + BlankLine + } + } + } + } else { + $TableParams = @{ + Name = "Disk Inventory - $($ClusterInfo.ClusterName)" + List = $false + Columns = 'Disk Name', 'Shelf', 'Bay', 'Capacity', 'Model', 'Type', 'Firmware' + ColumnWidths = 18, 13, 10, 10, 25, 12, 12 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams } - $OutObj | Table @TableParams } } catch { Write-PScriboMessage -IsWarning $_.Exception.Message diff --git a/Src/Private/Get-AbrOntapDiskShelf.ps1 b/Src/Private/Get-AbrOntapDiskShelf.ps1 index 3981912..96c4c69 100755 --- a/Src/Private/Get-AbrOntapDiskShelf.ps1 +++ b/Src/Private/Get-AbrOntapDiskShelf.ps1 @@ -26,49 +26,53 @@ function Get-AbrOntapDiskShelf { try { $NodeSum = Get-NcNode -Controller $Array if ($NodeSum) { - $OutObj = @() foreach ($Nodes in $NodeSum) { try { - $Nodeshelf = Get-NcShelf -NodeName $Nodes.Node -Controller $Array + $Nodeshelf = Get-NcShelf -NodeName $Nodes.Node -Controller $Array -ErrorAction SilentlyContinue if ($Nodeshelf) { - $inObj = [ordered] @{ - 'Node Name' = $Nodeshelf.NodeName - 'Channel' = $Nodeshelf.ChannelName - 'Shelf Name' = $Nodeshelf.ShelfName - 'Shelf ID' = $Nodeshelf.ShelfId - 'State' = $Nodeshelf.ShelfState - 'Type' = $Nodeshelf.ShelfType - 'Firmware' = $Nodeshelf.FirmwareRevA + $Nodeshelf.FirmwareRevB - 'Bay Count' = $Nodeshelf.ShelfBayCount + Section -ExcludeFromTOC -Style NOTOCHeading4 $($Nodes.Node) { + $OutObj = @() + foreach ($Shelf in $Nodeshelf) { + $inObj = [ordered] @{ + 'Channel' = $Shelf.ChannelName + 'Shelf Name' = $Shelf.ShelfName + 'Shelf ID' = $Shelf.ShelfId + 'Module' = $Shelf.Module + 'Module State' = $Shelf.ModuleState + 'State' = $Shelf.ShelfState + 'Type' = $Shelf.ShelfType + 'Firmware' = ($Shelf.FirmwareRevA + $Shelf.FirmwareRevB) ?? '--' + } + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } + if ($Healthcheck.Storage.ShelfStatus) { + $OutObj | Where-Object { $_.'State' -like 'offline' -or $_.'State' -like 'missing' } | Set-Style -Style Critical -Property 'State' + $OutObj | Where-Object { $_.'State' -like 'unknown' -or $_.'State' -like 'no-status' } | Set-Style -Style Warning -Property 'State' + } + $TableParams = @{ + Name = "Storage Shelf - $($Nodes.Node)" + List = $false + ColumnWidths = 13, 13, 13, 13, 12, 12, 12, 12 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams + if ($Healthcheck.Storage.ShelfStatus -and ($OutObj | Where-Object { $_.'State' -like 'offline' -or $_.'State' -like 'missing' })) { + Paragraph 'Health Check:' -Bold -Underline + BlankLine + Paragraph { + Text 'Best Practice:' -Bold + Text 'Ensure all disk shelves are online and operational. Investigate any shelves marked as offline or missing.' + } + BlankLine + } } - $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } } - if ($Healthcheck.Storage.ShelfStatus) { - $OutObj | Where-Object { $_.'State' -like 'offline' -or $_.'State' -like 'missing' } | Set-Style -Style Critical -Property 'State' - $OutObj | Where-Object { $_.'State' -like 'unknown' -or $_.'State' -like 'no-status' } | Set-Style -Style Warning -Property 'State' - } - $TableParams = @{ - Name = "Shelf Inventory - $($ClusterInfo.ClusterName)" - List = $true - ColumnWidths = 35, 65 - } - if ($Report.ShowTableCaptions) { - $TableParams['Caption'] = "- $($TableParams.Name)" - } - $OutObj | Table @TableParams - if ($Healthcheck.Storage.ShelfStatus -and ($OutObj | Where-Object { $_.'State' -like 'offline' -or $_.'State' -like 'missing' })) { - Paragraph 'Health Check:' -Bold -Underline - BlankLine - Paragraph { - Text 'Best Practice:' -Bold - Text 'Ensure all disk shelves are online and operational. Investigate any shelves marked as offline or missing.' - } - BlankLine - } } } catch { Write-PScriboMessage -IsWarning $_.Exception.Message diff --git a/Src/Private/Get-AbrOntapDiskShelfStorage.ps1 b/Src/Private/Get-AbrOntapDiskShelfStorage.ps1 new file mode 100755 index 0000000..8111bbd --- /dev/null +++ b/Src/Private/Get-AbrOntapDiskShelfStorage.ps1 @@ -0,0 +1,71 @@ +function Get-AbrOntapDiskShelfStorage { + <# + .SYNOPSIS + Used by As Built Report to retrieve NetApp ONTAP disk shelf storage information from the Cluster Management Network + .DESCRIPTION + + .NOTES + Version: 0.6.12 + Author: Jonathan Colon + Twitter: @jcolonfzenpr + Github: rebelinux + .EXAMPLE + + .LINK + + #> + [CmdletBinding()] + param ( + ) + + begin { + Write-PScriboMessage 'Collecting ONTAP disk shelf storage information.' + } + + process { + try { + $NodeshelfObj = Get-NcStorageShelf -Controller $Array -ErrorAction SilentlyContinue + if ($NodeshelfObj) { + $OutObj = @() + foreach ($Shelf in $NodeshelfObj) { + $inObj = [ordered] @{ + 'Model' = $Shelf.ShelfModel + 'Connection Type' = $Shelf.ConnectionType + 'Module Type' = $Shelf.ModuleType + 'Disk Count' = $Shelf.DiskCount + 'Serial Number' = $Shelf.SerialNumber + 'Operational Status' = $Shelf.OpStatus + 'Shelf Id' = $Shelf.Shelf + } + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } + if ($Healthcheck.Storage.ShelfStatus) { + $OutObj | Where-Object { $_.'Operational Status' -ne 'normal' } | Set-Style -Style Warning -Property 'Operational Status' + } + $TableParams = @{ + Name = "Disk Shelf - $($ClusterInfo.ClusterName)" + List = $false + ColumnWidths = 18, 13, 12, 11, 22, 14, 10 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams + if ($Healthcheck.Storage.ShelfStatus -and ($OutObj | Where-Object { $_.'Operational Status' -ne 'normal' })) { + Paragraph 'Health Check:' -Bold -Underline + BlankLine + Paragraph { + Text 'Best Practice:' -Bold + Text ' All disk shelves should have an working operational status.' + } + BlankLine + } + } + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + + end {} + +} \ No newline at end of file diff --git a/Src/Private/Get-AbrOntapDiskType.ps1 b/Src/Private/Get-AbrOntapDiskType.ps1 index 1dc38d0..7431870 100755 --- a/Src/Private/Get-AbrOntapDiskType.ps1 +++ b/Src/Private/Get-AbrOntapDiskType.ps1 @@ -24,66 +24,66 @@ function Get-AbrOntapDiskType { process { try { - if ($NodeDiskContainerType) { - $OutObj = @() - foreach ($DiskContainers in (Get-NcDisk -Controller $Array | ForEach-Object { $_.DiskRaidInfo.ContainerType } | Group-Object)) { - try { - $inObj = [ordered] @{ - 'Container' = $DiskContainers.Name - 'Disk Count' = $DiskContainers | Select-Object -ExpandProperty Count - } - $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) - } catch { - Write-PScriboMessage -IsWarning $_.Exception.Message + $OutObj = @() + foreach ($DiskContainers in (Get-NcDisk -Controller $Array | ForEach-Object { $_.DiskRaidInfo.ContainerType } | Group-Object)) { + try { + $inObj = [ordered] @{ + 'Container' = $DiskContainers.Name + 'Disk Count' = $DiskContainers | Select-Object -ExpandProperty Count } + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message } - if ($Healthcheck.Storage.DiskStatus) { - $OutObj | Where-Object { $_.'Container' -like 'broken' } | Set-Style -Style Critical -Property 'Disk Count' - } - $TableParams = @{ - Name = "Disk Container Type - $($ClusterInfo.ClusterName)" - List = $false - ColumnWidths = 50, 50 - } - if ($Report.ShowTableCaptions) { - $TableParams['Caption'] = "- $($TableParams.Name)" - } - $OutObj | Table @TableParams } + if ($Healthcheck.Storage.DiskStatus) { + $OutObj | Where-Object { $_.'Container' -like 'broken' } | Set-Style -Style Critical -Property 'Disk Count' + } + $TableParams = @{ + Name = "Disk Container Type - $($ClusterInfo.ClusterName)" + List = $false + ColumnWidths = 50, 50 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams $Node = Get-NcNode | Where-Object { $_.IsNodeHealthy -eq 'True' } if ($Node -and (Confirm-NcAggrSpareLow | Where-Object { $_.Value -eq 'True' })) { - $OutObj = @() - foreach ($Item in $Node) { - try { - $inObj = [ordered] @{ - 'Node' = $Item.Node - 'Aggregate Spare Low' = (Confirm-NcAggrSpareLow -Node $Item.Node).Value.ToString().Replace('True', 'Yes').Replace('False', 'No') + Section -ExcludeFromTOC -Style NOTOCHeading5 'Aggregate Spare Low Warning Per Node' { + $OutObj = @() + foreach ($Item in $Node) { + try { + $inObj = [ordered] @{ + 'Node' = $Item.Node + 'Aggregate Spare Low' = (Confirm-NcAggrSpareLow -Node $Item.Node).Value.ToString().Replace('True', 'Yes').Replace('False', 'No') + } + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message } - $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) - } catch { - Write-PScriboMessage -IsWarning $_.Exception.Message } - } - if ($Healthcheck.Storage.DiskStatus) { - $OutObj | Where-Object { $_.'Aggregate Spare Low' -like 'Yes' } | Set-Style -Style Critical -Property 'Node', 'Aggregate Spare Low' - } - $TableParams = @{ - Name = "HealthCheck - Aggregate Disk Spare Low - $($ClusterInfo.ClusterName)" - List = $false - ColumnWidths = 50, 50 - } - if ($Report.ShowTableCaptions) { - $TableParams['Caption'] = "- $($TableParams.Name)" - } - $OutObj | Table @TableParams - if ($Healthcheck.Storage.DiskStatus -and ($OutObj | Where-Object { $_.'Aggregate Spare Low' -like 'Yes' })) { - Paragraph 'Health Check:' -Bold -Underline - BlankLine - Paragraph { - Text 'Best Practice:' -Bold - Text 'Ensure that aggregate spare capacity is above the recommended threshold to maintain optimal performance and reliability.' + if ($Healthcheck.Storage.DiskStatus) { + $OutObj | Where-Object { $_.'Aggregate Spare Low' -like 'Yes' } | Set-Style -Style Critical -Property 'Node', 'Aggregate Spare Low' + } + $TableParams = @{ + Name = "Aggregate Disk Spare Low - $($ClusterInfo.ClusterName)" + List = $false + ColumnWidths = 50, 50 + } + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams + if ($Healthcheck.Storage.DiskStatus -and ($OutObj | Where-Object { $_.'Aggregate Spare Low' -like 'Yes' })) { + Paragraph 'Health Check:' -Bold -Underline + BlankLine + Paragraph { + Text 'Best Practice:' -Bold + Text 'Ensure that aggregate spare capacity is above the recommended threshold to maintain optimal performance and reliability.' + } + BlankLine } - BlankLine } } } catch { diff --git a/Src/Private/Get-AbrOntapEfficiencyAggr.ps1 b/Src/Private/Get-AbrOntapEfficiencyAggr.ps1 index 430ac48..e1beaf6 100755 --- a/Src/Private/Get-AbrOntapEfficiencyAggr.ps1 +++ b/Src/Private/Get-AbrOntapEfficiencyAggr.ps1 @@ -32,9 +32,9 @@ function Get-AbrOntapEfficiencyAggr { $Saving = Get-NcAggrEfficiency -Aggregate $Item.Name -Controller $Array | Select-Object -ExpandProperty AggrEfficiencyAggrInfo $inObj = [ordered] @{ 'Aggregate' = $Item.Name - 'Logical Used' = ($Saving.AggrLogicalUsed | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Physical Used' = ($Saving.AggrPhysicalUsed | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Compaction Saved' = ($Saving.AggrCompactionSaved | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Logical Used' = ($Saving.AggrLogicalUsed | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Physical Used' = ($Saving.AggrPhysicalUsed | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Compaction Saved' = ($Saving.AggrCompactionSaved | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' 'Data Reduction' = ${Saving}?.AggrDataReductionStorageEfficiencyRatio } diff --git a/Src/Private/Get-AbrOntapEfficiencyConfig.ps1 b/Src/Private/Get-AbrOntapEfficiencyConfig.ps1 index 00dd6b7..5d5a625 100755 --- a/Src/Private/Get-AbrOntapEfficiencyConfig.ps1 +++ b/Src/Private/Get-AbrOntapEfficiencyConfig.ps1 @@ -32,11 +32,11 @@ function Get-AbrOntapEfficiencyConfig { $Saving = Get-NcAggr -Aggregate $Item.Name -Controller $Array | Select-Object -ExpandProperty AggrSpaceAttributes $inObj = [ordered] @{ 'Aggregate' = $Item.Name - 'Used %' = ($Saving.PercentUsedCapacity | ConvertTo-FormattedNumber -Type Percent) ?? '--' - 'Capacity Tier Used' = ($Saving.CapacityTierUsed | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Compaction Saved %' = ($Saving.DataCompactionSpaceSavedPercent | ConvertTo-FormattedNumber -Type Percent) ?? '--' - 'Deduplication Saved %' = ($Saving.SisSpaceSavedPercent | ConvertTo-FormattedNumber -Type Percent) ?? '--' - 'Total Data Reduction' = (Get-NcAggrEfficiency -Aggregate $Item.Name -Controller $Array | Select-Object -ExpandProperty ).TotalStorageEfficiencyRatio ?? '--' + 'Used %' = ($Saving.PercentUsedCapacity | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Percent) ?? '--' + 'Capacity Tier Used' = ($Saving.CapacityTierUsed | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Compaction Saved %' = ($Saving.DataCompactionSpaceSavedPercent | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Percent) ?? '--' + 'Deduplication Saved %' = ($Saving.SisSpaceSavedPercent | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Percent) ?? '--' + 'Total Data Reduction' = (Get-NcAggrEfficiency -Aggregate $Item.Name -Controller $Array | Select-Object -ExpandProperty AggrEfficiencyCumulativeInfo).TotalStorageEfficiencyRatio ?? '--' } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) diff --git a/Src/Private/Get-AbrOntapEfficiencyVol.ps1 b/Src/Private/Get-AbrOntapEfficiencyVol.ps1 index aefe9a0..e38c518 100755 --- a/Src/Private/Get-AbrOntapEfficiencyVol.ps1 +++ b/Src/Private/Get-AbrOntapEfficiencyVol.ps1 @@ -36,12 +36,12 @@ function Get-AbrOntapEfficiencyVol { $Saving = Get-NcEfficiency -Volume $Item.Name -Vserver $Vserver -Controller $Array $inObj = [ordered] @{ 'Volume' = $Item.Name - 'Capacity' = ($Saving.Capacity | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Used' = ($Saving.Used | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Snapshot Used' = ($Saving.SnapshotUsed | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Total Savings' = ($Saving.Returns.Total | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Effective Used' = ($Saving.EffectiveUsed | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Efficiency Percent' = ($Saving.EfficiencyPercent | ConvertTo-FormattedNumber -Type Percent -NumberFormatString 0.0) ?? '--' + 'Capacity' = ($Saving.Capacity | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = ($Saving.Used | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Snapshot Used' = ($Saving.SnapshotUsed | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Total Savings' = ($Saving.Returns.Total | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Effective Used' = ($Saving.EffectiveUsed | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Efficiency Percent' = ($Saving.EfficiencyPercent | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Percent -NumberFormatString 0.0) ?? '--' } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { diff --git a/Src/Private/Get-AbrOntapEfficiencyVolDetailed.ps1 b/Src/Private/Get-AbrOntapEfficiencyVolDetailed.ps1 index e2d0b06..207dc92 100755 --- a/Src/Private/Get-AbrOntapEfficiencyVolDetailed.ps1 +++ b/Src/Private/Get-AbrOntapEfficiencyVolDetailed.ps1 @@ -36,13 +36,13 @@ function Get-AbrOntapEfficiencyVolDetailed { $Saving = Get-NcEfficiency -Volume $Item.Name -Vserver $Vserver -Controller $Array $inObj = [ordered] @{ 'Volume' = $Item.Name - 'Capacity' = ($Saving.Capacity | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Dedupe Savings' = ($Saving.Returns.Dedupe | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Compression Savings' = ($Saving.Returns.Compression | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Snapshot Savings' = ($Saving.Returns.Snapshot | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Cloning Savings' = ($Saving.Returns.Cloning | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Efficiency %' = ($Saving.EfficiencyPercent | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Percent ) ?? '--' - 'Efficiency % w/o Snapshots' = ([Math]::Round((($Saving.Returns.Dedupe + $Saving.Returns.Compression) / ($Saving.Used + $Saving.Returns.Dedupe + $Saving.Returns.Compression)) * 100) | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Percent) ?? '--' + 'Capacity' = ($Saving.Capacity | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Dedupe Savings' = ($Saving.Returns.Dedupe | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Compression Savings' = ($Saving.Returns.Compression | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Snapshot Savings' = ($Saving.Returns.Snapshot | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Cloning Savings' = ($Saving.Returns.Cloning | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Efficiency %' = ($Saving.EfficiencyPercent | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Percent ) ?? '--' + 'Efficiency % w/o Snapshots' = ([Math]::Round((($Saving.Returns.Dedupe + $Saving.Returns.Compression) / ($Saving.Used + $Saving.Returns.Dedupe + $Saving.Returns.Compression)) * 100) | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Percent) ?? '--' } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { diff --git a/Src/Private/Get-AbrOntapNetworkMGMT.ps1 b/Src/Private/Get-AbrOntapNetworkMGMT.ps1 index 6159871..3e4efa6 100755 --- a/Src/Private/Get-AbrOntapNetworkMGMT.ps1 +++ b/Src/Private/Get-AbrOntapNetworkMGMT.ps1 @@ -216,8 +216,8 @@ function Get-AbrOntapNetworkMgmt { try { $ClusterData = Get-NcNetInterface -Controller $Array | Where-Object { $_.DataProtocols -ne 'fcp' -and $_.IsHome -like 'False' } if ($ClusterData) { - Section -ExcludeFromTOC -Style Heading6 'HealthCheck - Network Interface Home Status' { - Paragraph "The following table provides the LIF Home Status Information in $($ClusterInfo.ClusterName)." + Section -ExcludeFromTOC -Style Heading6 'Network Interfaces Home Status' { + Paragraph "The following table provides the LIF Home Status Information from $($ClusterInfo.ClusterName)." BlankLine $ClusterObj = @() foreach ($Item in $ClusterData) { @@ -239,7 +239,7 @@ function Get-AbrOntapNetworkMgmt { } $TableParams = @{ - Name = "Network Interface Home Status - $($ClusterInfo.ClusterName)" + Name = "Network Interfaces Home Status - $($ClusterInfo.ClusterName)" List = $false ColumnWidths = 20, 25, 25, 10, 20 } diff --git a/Src/Private/Get-AbrOntapNodeStorage.ps1 b/Src/Private/Get-AbrOntapNodeStorage.ps1 index 5299e82..3f34217 100755 --- a/Src/Private/Get-AbrOntapNodeStorage.ps1 +++ b/Src/Private/Get-AbrOntapNodeStorage.ps1 @@ -32,9 +32,9 @@ function Get-AbrOntapNodeStorage { $inObj = [ordered] @{ 'Node' = $Item.Vserver 'Aggregate' = $Item.Aggregate - 'Capacity' = ($Item.Totalsize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' - 'Available' = ($Item.Available | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' - 'Used' = ($Item.Used | ConvertTo-FormattedNumber -Type Percent) ?? '--' + 'Capacity' = ($Item.Totalsize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Available' = ($Item.Available | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Used' = ($Item.Used | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Percent) ?? '--' } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { @@ -42,7 +42,6 @@ function Get-AbrOntapNodeStorage { } } if ($Healthcheck.Node.HW) { - $OutObj | Where-Object { $_.'Status' -like 'offline' } | Set-Style -Style Warning -Property 'Status' $OutObj | Where-Object { $_.'Used' -ge 90 } | Set-Style -Style Critical -Property 'Used' } diff --git a/Src/Private/Get-AbrOntapNodesHW.ps1 b/Src/Private/Get-AbrOntapNodesHW.ps1 index 70c1988..43e20bd 100755 --- a/Src/Private/Get-AbrOntapNodesHW.ps1 +++ b/Src/Private/Get-AbrOntapNodesHW.ps1 @@ -38,6 +38,7 @@ function Get-AbrOntapNodesHW { 'Vendor' = $NodeHWs.VendorId 'AFF/FAS' = $NodeHWs.ProdType 'All Flash Optimized' = $NodeInfo.IsAllFlashOptimized + 'Cloud Optimized' = $NodeInfo.IsCloudOptimized 'Epsilon' = $NodeInfo.IsEpsilonNode 'System Healthy' = ($NodeInfo.IsNodeHealthy -eq $True) ? 'Healthy': 'UnHealthy' 'Failed Fan Count' = $NodeInfo.EnvFailedFanCount diff --git a/Src/Private/Get-AbrOntapStorageAGGR.ps1 b/Src/Private/Get-AbrOntapStorageAGGR.ps1 index 28d6d3d..84066d2 100755 --- a/Src/Private/Get-AbrOntapStorageAGGR.ps1 +++ b/Src/Private/Get-AbrOntapStorageAGGR.ps1 @@ -35,9 +35,9 @@ function Get-AbrOntapStorageAGGR { 'Name' = $Data.Name 'Home Nodes' = ${AggrOwner}?.HomeName ?? '--' 'Owner Nodes' = ${AggrOwner}?.OwnerName ?? '--' - 'Capacity' = ($Data.Totalsize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Available' = ($Data.Available | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Used' = (($Data.Totalsize - $Data.Available ) | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Capacity' = ($Data.Totalsize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Available' = ($Data.Available | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = (($Data.Totalsize - $Data.Available ) | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' 'Disk Count' = $Data.Disks 'Root' = ((Get-NcAggr -Name $Data.Name -Controller $Array | ForEach-Object { $_.AggrRaidAttributes.HasLocalRoot }) -eq 'False') ? 'No': 'Yes' 'Raid Type' = (($Data.RaidType.Split(',')[0]).ToUpper()) ?? '--' @@ -58,7 +58,7 @@ function Get-AbrOntapStorageAGGR { } if ($InfoLevel.Storage -ge 2) { - Paragraph "The following sections detail the $($Data.Name) aggregate configuration." + Paragraph "The following sections detail the storage aggregate configuration and health status in $($ClusterInfo.ClusterName)." foreach ($Data in $ObjectDataInfo) { Section -Style NOTOCHeading4 -ExcludeFromTOC "$($Data.Name)" { $TableParams = @{ @@ -111,15 +111,15 @@ function Get-AbrOntapStorageAGGR { try { $AggrSpare = Get-NcAggrSpare -Controller $Array if ($AggrSpare) { - Section -Style Heading4 'Aggregate Spares' { + Section -Style Heading4 'Disk Spares' { $OutObj = @() foreach ($Spare in $AggrSpare) { try { $inObj = [ordered] @{ 'Name' = $Spare.Disk - 'Capacity' = ($Spare.TotalSize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Root Usable' = ($Spare.LocalUsableRootSize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Data Usable' = ($Spare.LocalUsableDataSize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Capacity' = ($Spare.TotalSize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Root Usable' = ($Spare.LocalUsableRootSize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Data Usable' = ($Spare.LocalUsableDataSize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' 'Shared Disk' = $Spare.IsDiskShared 'Disk Zeroed' = $Spare.IsDiskZeroed 'Owner' = $Spare.OriginalOwner @@ -133,7 +133,7 @@ function Get-AbrOntapStorageAGGR { $OutObj | Where-Object { $_.'Disk Zeroed' -eq 'No' } | Set-Style -Style Warning -Property 'Disk Zeroed' } $TableParams = @{ - Name = "Aggregates Spares - $($ClusterInfo.ClusterName)" + Name = "Disk Spares - $($ClusterInfo.ClusterName)" List = $false ColumnWidths = 20, 12, 12, 12, 12, 12, 20 } @@ -148,11 +148,11 @@ function Get-AbrOntapStorageAGGR { } try { if ($InfoLevel.Storage -ge 2) { - Section -Style Heading4 'Aggregate Options' { + Section -Style Heading4 'Per Aggregate Options' { $Aggregates = Get-NcAggr -Controller $Array | Where-Object { !$_.AggrRaidAttributes.HasLocalRoot } foreach ($Aggregate in $Aggregates) { try { - Section -Style Heading5 "$($Aggregate.Name) Options" { + Section -ExcludeFromTOC -Style NOTOCHeading5 "$($Aggregate.Name)" { $OutObj = @() $Options = Get-NcAggrOption -Controller $Array -Name $Aggregate.Name $Option = @{} @@ -190,7 +190,7 @@ function Get-AbrOntapStorageAGGR { $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) $TableParams = @{ - Name = "Aggregates Options - $($Aggregate.Name)" + Name = "Options - $($Aggregate.Name)" List = $true ColumnWidths = 50, 50 } diff --git a/Src/Private/Get-AbrOntapStorageFabricPool.ps1 b/Src/Private/Get-AbrOntapStorageFabricPool.ps1 index cdd4cd9..60c087d 100755 --- a/Src/Private/Get-AbrOntapStorageFabricPool.ps1 +++ b/Src/Private/Get-AbrOntapStorageFabricPool.ps1 @@ -34,7 +34,7 @@ function Get-AbrOntapStorageFabricPool { 'Aggregate' = $Item.Aggregate 'Fabric Pool Name' = $Item.ObjectStoreName 'Type' = $Item.ProviderType - 'Used Space' = ($Item.UsedSpace | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize -NumberFormatString 0.0) ?? '--' + 'Used Space' = ($Item.UsedSpace | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize -NumberFormatString 0.0) ?? '--' 'Status' = $Item.ObjectStoreAvailability } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) diff --git a/Src/Private/Get-AbrOntapStorageFabricPoolConfig.ps1 b/Src/Private/Get-AbrOntapStorageFabricPoolConfig.ps1 index 80ee4f0..50091e9 100755 --- a/Src/Private/Get-AbrOntapStorageFabricPoolConfig.ps1 +++ b/Src/Private/Get-AbrOntapStorageFabricPoolConfig.ps1 @@ -36,7 +36,7 @@ function Get-AbrOntapEfficiencyAggrConfig { 'Port' = $Item.Port 'SSL Enabled' = $Item.SslEnabled 'Provider Type' = $Item.ProviderType - 'Used Space' = ($Item.UsedSpace | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize -NumberFormatString 0.0) ?? '--' + 'Used Space' = ($Item.UsedSpace | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize -NumberFormatString 0.0) ?? '--' } $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) diff --git a/Src/Private/Get-AbrOntapSysConfigBackup.ps1 b/Src/Private/Get-AbrOntapSysConfigBackup.ps1 index a4be4f4..1c4af77 100755 --- a/Src/Private/Get-AbrOntapSysConfigBackup.ps1 +++ b/Src/Private/Get-AbrOntapSysConfigBackup.ps1 @@ -36,7 +36,7 @@ function Get-AbrOntapSysConfigBackup { $inObj = [ordered] @{ 'Backup Name' = $Item.BackupName 'Created' = $Item.Created - 'Size' = ($Item.BackupSize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Size' = ($Item.BackupSize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' 'Schedule' = $Item.Schedule 'Is Auto' = $Item.IsAuto } diff --git a/Src/Private/Get-AbrOntapVserverCGLun.ps1 b/Src/Private/Get-AbrOntapVserverCGLun.ps1 index 8cfe032..2472c35 100755 --- a/Src/Private/Get-AbrOntapVserverCGLun.ps1 +++ b/Src/Private/Get-AbrOntapVserverCGLun.ps1 @@ -34,8 +34,8 @@ function Get-AbrOntapVserverCGLun { try { $inObj = [ordered] @{ 'Name' = $Item.Name.Split('/')[3] - 'Capacity' = ($Item.space.size | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Used' = ($Item.space.used | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Capacity' = ($Item.space.size | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = ($Item.space.used | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' 'OS Type' = $Item.os_type 'Volume State' = $Item.status.container_state 'Mapped' = $Item.status.mapped diff --git a/Src/Private/Get-AbrOntapVserverCGNamespace.ps1 b/Src/Private/Get-AbrOntapVserverCGNamespace.ps1 index bb1adb5..c19e611 100755 --- a/Src/Private/Get-AbrOntapVserverCGNamespace.ps1 +++ b/Src/Private/Get-AbrOntapVserverCGNamespace.ps1 @@ -34,8 +34,8 @@ function Get-AbrOntapVserverCGNamespace { try { $inObj = [ordered] @{ 'Name' = $Item.Name.Split('/')[3] - 'Capacity' = ($Item.space.size | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Used' = ($Item.space.used | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Capacity' = ($Item.space.size | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = ($Item.space.used | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' 'OS Type' = $Item.os_type 'Volume State' = $Item.status.container_state 'Mapped' = $Item.status.mapped diff --git a/Src/Private/Get-AbrOntapVserverCGSummary.ps1 b/Src/Private/Get-AbrOntapVserverCGSummary.ps1 index 871ccbb..9ec9b78 100755 --- a/Src/Private/Get-AbrOntapVserverCGSummary.ps1 +++ b/Src/Private/Get-AbrOntapVserverCGSummary.ps1 @@ -35,9 +35,9 @@ function Get-AbrOntapVserverCGSummary { try { $inObj = [ordered] @{ 'Name' = $Item.Name - 'Capacity' = ($Item.space.size | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Available' = ($Item.space.available | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Used' = ($Item.space.used | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Capacity' = ($Item.space.size | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Available' = ($Item.space.available | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = ($Item.space.used | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' 'Replicated' = $Item.replicated 'Lun Count' = ($Item.luns.name).count } diff --git a/Src/Private/Get-AbrOntapVserverLunStorage.ps1 b/Src/Private/Get-AbrOntapVserverLunStorage.ps1 index f2b3ceb..16e33a1 100755 --- a/Src/Private/Get-AbrOntapVserverLunStorage.ps1 +++ b/Src/Private/Get-AbrOntapVserverLunStorage.ps1 @@ -42,9 +42,9 @@ function Get-AbrOntapVserverLunStorage { 'Serial Number' = $Item.SerialNumber 'Initiator Group' = ($lunmap.count -eq 0) ? 'None': $lunmap 'Home Node ' = $Item.Node - 'Capacity' = ($Item.Size | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Available' = (($Item.Size - $Item.SizeUsed) | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Used' = ((($Item.SizeUsed / $Item.Size) * 100) | ConvertTo-FormattedNumber -Type Percent) ?? '--' + 'Capacity' = ($Item.Size | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Available' = (($Item.Size - $Item.SizeUsed) | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = ((($Item.SizeUsed / $Item.Size) * 100) | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Percent) ?? '--' 'OS Type' = $Item.Protocol 'Is Thin' = $Item.Thin 'Space Allocation' = $Item.IsSpaceAllocEnabled -eq $True ? 'Enabled': 'Disabled' diff --git a/Src/Private/Get-AbrOntapVserverNamespaceStorage.ps1 b/Src/Private/Get-AbrOntapVserverNamespaceStorage.ps1 index ca54861..c9435a1 100755 --- a/Src/Private/Get-AbrOntapVserverNamespaceStorage.ps1 +++ b/Src/Private/Get-AbrOntapVserverNamespaceStorage.ps1 @@ -42,9 +42,9 @@ function Get-AbrOntapVserverNamespaceStorage { 'Serial Number' = $Item.Uuid 'Subsystem Map' = ($namespacemap).count -eq 0 ? 'None': $namespacemap.Subsystem 'Home Node ' = $Item.Node - 'Capacity' = ($Item.Size | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Available' = (($Item.Size - $Item.SizeUsed) | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Used' = ((($Item.SizeUsed / $Item.Size) * 100) | ConvertTo-FormattedNumber -Type Percent) ?? '--' + 'Capacity' = ($Item.Size | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Available' = (($Item.Size - $Item.SizeUsed) | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = ((($Item.SizeUsed / $Item.Size) * 100) | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Percent) ?? '--' 'OS Type' = $Item.Ostype 'Is Mapped' = switch ([string]::IsNullOrEmpty($Item.Subsystem)) { $true { 'No' } diff --git a/Src/Private/Get-AbrOntapVserverNetworkInterface.ps1 b/Src/Private/Get-AbrOntapVserverNetworkInterface.ps1 index f6ff407..a8a3015 100644 --- a/Src/Private/Get-AbrOntapVserverNetworkInterface.ps1 +++ b/Src/Private/Get-AbrOntapVserverNetworkInterface.ps1 @@ -60,7 +60,7 @@ function Get-AbrOntapVserverNetworkInterface { $TableParams['Caption'] = "- $($TableParams.Name)" } $ClusterObj | Table @TableParams - if ($Healthcheck.Network.Interface -and (($ClusterObj | Where-Object { $_.'Status' -notlike 'UP' }) -or (($ClusterObj | Where-Object { $_.'IsHome' -ne 'Yes' })))) { + if ($Healthcheck.Network.Interface -and (($ClusterObj | Where-Object { $_.'Status' -notlike 'UP' }) -or (($ClusterObj | Where-Object { $_.'Is Home' -ne 'Yes' })))) { Paragraph 'Health Check:' -Bold -Underline BlankLine if ($ClusterObj | Where-Object { $_.'Status' -notlike 'UP' }) { @@ -70,7 +70,7 @@ function Get-AbrOntapVserverNetworkInterface { } BlankLine } - if ($ClusterObj | Where-Object { $_.'IsHome' -ne 'Yes' }) { + if ($ClusterObj | Where-Object { $_.'Is Home' -ne 'Yes' }) { Paragraph { Text 'Best Practice:' -Bold Text 'Ensure that all network interfaces are on their designated home ports to maintain optimal network performance and reliability.' diff --git a/Src/Private/Get-AbrOntapVserverS3Bucket.ps1 b/Src/Private/Get-AbrOntapVserverS3Bucket.ps1 index d9d8f43..6353c22 100755 --- a/Src/Private/Get-AbrOntapVserverS3Bucket.ps1 +++ b/Src/Private/Get-AbrOntapVserverS3Bucket.ps1 @@ -36,8 +36,8 @@ function Get-AbrOntapVserverS3Bucket { $inObj = [ordered] @{ 'Bucket' = $Item.Name 'Volume' = $Item.volume.name - 'Total' = ($Item.size | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Used' = ($Item.logical_used_size | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Total' = ($Item.size | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = ($Item.logical_used_size | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' } $VserverObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { diff --git a/Src/Private/Get-AbrOntapVserverSummary.ps1 b/Src/Private/Get-AbrOntapVserverSummary.ps1 index b5d4252..f8e4100 100755 --- a/Src/Private/Get-AbrOntapVserverSummary.ps1 +++ b/Src/Private/Get-AbrOntapVserverSummary.ps1 @@ -78,9 +78,9 @@ function Get-AbrOntapVserverSummary { $inObj = [ordered] @{ 'Root Volume' = $Item.Name 'Status' = $Item.State - 'Total Size' = ($Item.Totalsize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Used' = ($Item.Used | ConvertTo-FormattedNumber -Type Percent) ?? '--' - 'Available' = ($Item.Available | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Total Size' = ($Item.Totalsize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = ($Item.Used | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Percent) ?? '--' + 'Available' = ($Item.Available | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' 'Dedup' = $Item.Dedupe 'Aggregate' = $Item.Aggregate } @@ -120,7 +120,7 @@ function Get-AbrOntapVserverSummary { 'Aggregate' = $Item.AggregateName 'Type' = $Item.AggregateType 'SnapLock Type' = $Item.SnaplockType - 'Available' = ($Item.AvailableSize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Available' = ($Item.AvailableSize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' } $VserverObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { diff --git a/Src/Private/Get-AbrOntapVserverVolumeSnapshot.ps1 b/Src/Private/Get-AbrOntapVserverVolumeSnapshot.ps1 index 9cbfd50..0f41d19 100755 --- a/Src/Private/Get-AbrOntapVserverVolumeSnapshot.ps1 +++ b/Src/Private/Get-AbrOntapVserverVolumeSnapshot.ps1 @@ -38,9 +38,9 @@ function Get-AbrOntapVserverVolumeSnapshot { $inObj = [ordered] @{ 'Volume' = $Item.Name 'Snapshot Enabled' = $SnapPolicy.AutoSnapshotsEnabled - 'Reserve Size' = ($SnapReserve.SnapshotReserveSize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Reserve Available' = ($SnapReserve.SnapshotReserveAvailable | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' - 'Used' = ($SnapReserve.SizeUsedBySnapshots | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Reserve Size' = ($SnapReserve.SnapshotReserveSize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Reserve Available' = ($SnapReserve.SnapshotReserveAvailable | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = ($SnapReserve.SizeUsedBySnapshots | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' 'Policy' = $SnapPolicy.SnapshotPolicy } diff --git a/Src/Private/Get-AbrOntapVserverVolumeSnapshotHealth.ps1 b/Src/Private/Get-AbrOntapVserverVolumeSnapshotHealth.ps1 index 2a5401b..efd6fd7 100755 --- a/Src/Private/Get-AbrOntapVserverVolumeSnapshotHealth.ps1 +++ b/Src/Private/Get-AbrOntapVserverVolumeSnapshotHealth.ps1 @@ -43,7 +43,7 @@ function Get-AbrOntapVserverVolumeSnapshotHealth { 'Volume Name' = $Item.Volume 'Snapshot Name' = $Item.Name 'Created Time' = $Item.Created - 'Used' = ($Item.Total | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Used' = ($Item.Total | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' } $VserverObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { diff --git a/Src/Private/Get-AbrOntapVserverVolumes.ps1 b/Src/Private/Get-AbrOntapVserverVolumes.ps1 index c0ba2e9..bc5fb89 100755 --- a/Src/Private/Get-AbrOntapVserverVolumes.ps1 +++ b/Src/Private/Get-AbrOntapVserverVolumes.ps1 @@ -36,9 +36,9 @@ function Get-AbrOntapVserverVolume { $inObj = [ordered] @{ 'Volume' = $Item.Name 'Status' = $Item.State - 'Capacity' = ($Item.Totalsize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' - 'Available' = ($Item.Available | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' - 'Used' = ($Item.Used | ConvertTo-FormattedNumber -Type Percent -ErrorAction SilentlyContinue) ?? '--' + 'Capacity' = ($Item.Totalsize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Available' = ($Item.Available | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Used' = ($Item.Used | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Percent) ?? '--' 'Aggregate' = $Item.Aggregate } $VserverObj += [pscustomobject](ConvertTo-HashToYN $inObj) diff --git a/Src/Private/Get-AbrOntapVserverVolumesFlexcache.ps1 b/Src/Private/Get-AbrOntapVserverVolumesFlexcache.ps1 index fe36b4f..c72c62c 100755 --- a/Src/Private/Get-AbrOntapVserverVolumesFlexcache.ps1 +++ b/Src/Private/Get-AbrOntapVserverVolumesFlexcache.ps1 @@ -41,7 +41,7 @@ function Get-AbrOntapVserverVolumesFlexcache { 'Cache Volume' = $Item.CacheVolume 'Origin Vserver' = $Item.OriginVserver 'Origin Volume' = $Item.OriginVolume - 'Capacity' = ($VolumeUsage.TotalSize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Capacity' = ($VolumeUsage.TotalSize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { @@ -72,7 +72,7 @@ function Get-AbrOntapVserverVolumesFlexcache { 'Origin Volume' = $Item.OriginVolume 'Cache Vserver' = $Item.Vserver 'Cache Volume' = $Item.Volume - 'Capacity' = ($Item.Size | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type Datasize) ?? '--' + 'Capacity' = ($Item.Size | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type Datasize) ?? '--' } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { diff --git a/Src/Private/Get-AbrOntapVserverVolumesFlexclone.ps1 b/Src/Private/Get-AbrOntapVserverVolumesFlexclone.ps1 index 6abfbc1..45e0bdc 100755 --- a/Src/Private/Get-AbrOntapVserverVolumesFlexclone.ps1 +++ b/Src/Private/Get-AbrOntapVserverVolumesFlexclone.ps1 @@ -39,9 +39,9 @@ function Get-AbrOntapVserverVolumesFlexclone { 'Parent Snapshot' = $Item.ParentSnapshot 'Space Reserve' = $Item.SpaceReserve 'Space Guarantee' = $Item.SpaceGuaranteeEnabled - 'Capacity' = ($Item.Size | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' - 'Available' = ($Item.Size - $Item.Used | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' - 'Used' = ($Item.Used | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Capacity' = ($Item.Size | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Available' = ($Item.Size - $Item.Used | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Used' = ($Item.Used | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' 'Aggregate' = $Item.Aggregate } $VserverObj = [pscustomobject](ConvertTo-HashToYN $inObj) diff --git a/Src/Private/Get-AbrOntapVserverVolumesFlexgroup.ps1 b/Src/Private/Get-AbrOntapVserverVolumesFlexgroup.ps1 index 4e97a88..d58f158 100755 --- a/Src/Private/Get-AbrOntapVserverVolumesFlexgroup.ps1 +++ b/Src/Private/Get-AbrOntapVserverVolumesFlexgroup.ps1 @@ -36,7 +36,7 @@ function Get-AbrOntapVserverVolumesFlexgroup { $inObj = [ordered] @{ 'Volume' = $Item.Name 'Status' = $Item.State - 'Capacity' = ($Item.Totalsize | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Capacity' = ($Item.Totalsize | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { diff --git a/Src/Private/Get-AbrOntapVserverVolumesQuota.ps1 b/Src/Private/Get-AbrOntapVserverVolumesQuota.ps1 index 40492b5..50d1a1d 100755 --- a/Src/Private/Get-AbrOntapVserverVolumesQuota.ps1 +++ b/Src/Private/Get-AbrOntapVserverVolumesQuota.ps1 @@ -91,10 +91,10 @@ function Get-AbrOntapVserverVolumesQuota { 'Volume' = $Item.Volume 'Type' = $Item.QuotaType 'Target' = $Item.QuotaTarget - 'Disk Limit' = ($Item.DiskLimit | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' - 'File Limit' = ($Item.FileLimit | ConvertTo-FormattedNumber -Type Count) ?? '--' - 'Soft Disk Limit' = ($Item.SoftDiskLimit | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' - 'Soft File Limit' = ($Item.SoftFileLimit | ConvertTo-FormattedNumber -Type Count) ?? '--' + 'Disk Limit' = ($Item.DiskLimit | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'File Limit' = ($Item.FileLimit | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Count) ?? '--' + 'Soft Disk Limit' = ($Item.SoftDiskLimit | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Soft File Limit' = ($Item.SoftFileLimit | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Count) ?? '--' } $VserverObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($null -ne $Item.QuotaError) { @@ -136,9 +136,9 @@ function Get-AbrOntapVserverVolumesQuota { 'Volume' = $Item.Volume 'Quota Target' = $Item.QuotaTarget 'Qtree' = $Item.Qtree - 'Disk Limit' = ($Item.DiskLimit | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' - 'Soft Disk Limit' = ($Item.SoftDiskLimit | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' - 'Disk Used' = ($Item.DiskUsed | ConvertTo-FormattedNumber -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Disk Limit' = ($Item.DiskLimit | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Soft Disk Limit' = ($Item.SoftDiskLimit | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' + 'Disk Used' = ($Item.DiskUsed | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -NumberFormatString 0.0 -Type DataSize) ?? '--' } $VserverObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { @@ -179,9 +179,9 @@ function Get-AbrOntapVserverVolumesQuota { 'Volume' = $Item.Volume 'Quota Target' = $Item.QuotaTarget 'Qtree' = $Item.Qtree - 'File Limit' = ($Item.FileLimit | ConvertTo-FormattedNumber -Type Count) ?? '--' - 'Soft File Limit' = ($Item.SoftFileLimit | ConvertTo-FormattedNumber -Type Count) ?? '--' - 'Files Used' = ($Item.FilesUsed | ConvertTo-FormattedNumber -Type Count) ?? '--' + 'File Limit' = ($Item.FileLimit | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Count) ?? '--' + 'Soft File Limit' = ($Item.SoftFileLimit | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Count) ?? '--' + 'Files Used' = ($Item.FilesUsed | ConvertTo-FormattedNumber -ErrorAction SilentlyContinue -Type Count) ?? '--' } $VserverObj += [pscustomobject](ConvertTo-HashToYN $inObj) } catch { diff --git a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 index c99a946..461d964 100755 --- a/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 +++ b/Src/Public/Invoke-AsBuiltReport.NetApp.ONTAP.ps1 @@ -36,6 +36,11 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { break } + # Import Report Configuration + $script:Report = $ReportConfig.Report + $script:InfoLevel = $ReportConfig.InfoLevel + $script:Options = $ReportConfig.Options + # Check the version of the dependency modules if ($Options.UpdateCheck) { Write-ReportModuleInfo -ModuleName 'Netapp.ONTAP' @@ -46,7 +51,7 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { if ($Options.UpdateCheck) { Write-Host ' - Getting dependency information:' # Check the version of the dependency modules - $ModuleArray = @('AsBuiltReport.Netapp.ONTAP', 'Diagrammer.Core') + $ModuleArray = @('Diagrammer.Core') foreach ($Module in $ModuleArray) { try { @@ -65,30 +70,6 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { } } } - # Check the version of the dependency modules - $ModuleArray = @('AsBuiltReport.Netapp.ONTAP', 'Diagrammer.Core') - - foreach ($Module in $ModuleArray) { - try { - $InstalledVersion = Get-Module -ListAvailable -Name $Module -ErrorAction SilentlyContinue | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version - - if ($InstalledVersion) { - Write-Host " - $Module module v$($InstalledVersion.ToString()) is currently installed." - $LatestVersion = Find-Module -Name $Module -Repository PSGallery -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version - if ($InstalledVersion -lt $LatestVersion) { - Write-Host " - $Module module v$($LatestVersion.ToString()) is available." -ForegroundColor Red - Write-Host " - Run 'Update-Module -Name $Module -Force' to install the latest version." -ForegroundColor Red - } - } - } catch { - Write-PScriboMessage -IsWarning $_.Exception.Message - } - } - - # Import Report Configuration - $script:Report = $ReportConfig.Report - $script:InfoLevel = $ReportConfig.InfoLevel - $script:Options = $ReportConfig.Options # General information $script:TextInfo = (Get-Culture).TextInfo @@ -174,23 +155,21 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { Write-PScriboMessage "Node InfoLevel set at $($InfoLevel.Node)." if ($InfoLevel.Node -gt 0) { - Section -Style Heading2 'Node Information' { - Paragraph "The following section provides a summary of the Node in $($ClusterInfo.ClusterName)." + Section -Style Heading2 'Nodes' { + Paragraph "The following section provides detailed information of nodes in cluster $($ClusterInfo.ClusterName)." BlankLine - Section -Style Heading3 'Node Inventory' { - Paragraph "The following section provides the node inventory in $($ClusterInfo.ClusterName)." - BlankLine + Section -Style Heading3 'Inventory' { Get-AbrOntapNode - Section -Style Heading4 'Node Vol0' { + Section -Style Heading4 'Root Volume Vol0' { Get-AbrOntapNodeStorage } if ($InfoLevel.Node -ge 2) { - Section -Style Heading4 'Node Hardware' { + Section -Style Heading4 'Hardware Details' { Get-AbrOntapNodesHW } } if (Get-NcServiceProcessor -Controller $Array) { - Section -Style Heading4 'Node Service-Processor' { + Section -Style Heading4 'Service-Processor' { Get-AbrOntapNodesSP } } @@ -204,9 +183,9 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { Write-PScriboMessage "Storage InfoLevel set at $($InfoLevel.Node)." if ($InfoLevel.Storage -gt 0) { Section -Style Heading2 'Storage Information' { - Paragraph "The following section provides a summary of the storage hardware in $($ClusterInfo.ClusterName)." + Paragraph "The following section provides detailed information about the storage configuration for cluster $($ClusterInfo.ClusterName)." BlankLine - Section -Style Heading3 'Aggregate Inventory' { + Section -Style Heading3 'Aggregates (Local Tiers)' { if (Get-NcAggr -Controller $Array) { Get-AbrOntapStorageAGGR $StorageAggrDiagram = Get-AbrOntapStorageAggrDiagram @@ -230,36 +209,41 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { } } } - Section -Style Heading3 'Disk Information' { - Paragraph "The following section provides the disk summary information in controller $($ClusterInfo.ClusterName)." - BlankLine - Section -Style Heading4 'Per Node Disk Assignment' { - Paragraph "The following section provides the number of disks assigned to each controller in $($ClusterInfo.ClusterName)." + if ($InfoLevel.Storage -gt 0) { + Section -Style Heading3 'Disks' { + Paragraph "The following section provides a comprehensive summary of disk inventory and configuration across all controllers in the $($ClusterInfo.ClusterName) cluster." BlankLine - Get-AbrOntapDiskAssign - } - $Nodes = Get-NcNode -Controller $Array - foreach ($Node in $Nodes) { - Section -Style Heading4 "Disk Owned by Node $Node" { - Get-AbrOntapDiskOwner -Node $Node + Section -Style Heading4 'Per Node Disk Assignment' { + Get-AbrOntapDiskAssign + $Nodes = Get-NcNode -Controller $Array + foreach ($Node in $Nodes) { + Section -ExcludeFromTOC -Style NOTOCHeading5 $Node { + Get-AbrOntapDiskOwner -Node $Node + } + } } - } - Section -Style Heading4 'Disk Container Type' { - Get-AbrOntapDiskType - } - if (Get-NcDisk -Controller $Array | Where-Object { $_.DiskRaidInfo.ContainerType -eq 'broken' }) { - Section -Style Heading4 'Failed Disk' { - Get-AbrOntapDiskBroken + Section -Style Heading4 'Disk Container Type' { + Get-AbrOntapDiskType } - } - if (Get-NcNode -Controller $Array | Select-Object Node | Get-NcShelf -Controller $Array -ErrorAction SilentlyContinue) { - Section -Style Heading3 'Shelf Inventory' { - Get-AbrOntapDiskShelf + if (Get-NcDisk -Controller $Array | Where-Object { $_.DiskRaidInfo.ContainerType -eq 'broken' }) { + Section -Style Heading4 'Failed Disk' { + Get-AbrOntapDiskBroken + } } - } - if ($InfoLevel.Storage -ge 2) { - Section -Style Heading4 'Disk Inventory' { - Get-AbrOntapDiskInv + if (Get-NcNode -Controller $Array | Select-Object Node | Get-NcShelf -Controller $Array -ErrorAction SilentlyContinue) { + Section -Style Heading3 'Storage Shelf' { + Get-AbrOntapDiskShelf + } + } + if (Get-NcStorageShelf -Controller $Array -ErrorAction SilentlyContinue) { + Section -Style Heading3 ' Disk Shelf' { + Get-AbrOntapDiskShelfStorage + } + } + if (Get-NcDisk -Controller $Array) { + Section -Style Heading4 'Disk Inventory' { + Get-AbrOntapDiskInv + } } } } @@ -342,7 +326,7 @@ function Invoke-AsBuiltReport.NetApp.ONTAP { } } } - Section -Style Heading4 'Broadcast Domain' { + Section -Style Heading4 'Broadcast Domains' { Get-AbrOntapNetworkBroadcastDomain } Section -Style Heading4 'Failover Groups' { diff --git a/Todo.md b/Todo.md index ea5ca07..1f1ff94 100644 --- a/Todo.md +++ b/Todo.md @@ -1,4 +1,10 @@ - [x] Migrate [PSCustomObject] @{ to $inObj +- [x] Finish Get-AbrOntapDiskInv.ps1 + - [x] Add Firmware + - [x] Add Type + - [x] Add Aggregate + - [x] Fix Capacity Formatting + - [] Network Port Diagram - [] Cluster Network Ports: - [] Document all ports and lifs used by the cluster nodes for cluster communication. @@ -45,3 +51,16 @@ Import-Module Diagrammer.Core -Force New-AsBuiltReport -Report NetApp.ONTAP -AsBuiltConfigFilePath "$($env:HOME)\script\AsBuiltReport.json" -OutputFolderPath "$($env:HOME)\" -Target 192.168.7.60 -Format HTML -EnableHealthCheck -Credential $Cred -ReportConfigFilePath "$($env:HOME)\script\AsBuiltReport.NetApp.ONTAP.json" ``` + +```powershell +$password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force +$Cred = New-Object System.Management.Automation.PSCredential ("admin", $password) + +Connect-NcController 192.168.5.70 -Credential $Cred + +Import-Module AsBuiltReport.NetApp.ONTAP -Force +Import-Module NetApp.ONTAP -Force +Import-Module Diagrammer.Core -Force + +New-AsBuiltReport -Report NetApp.ONTAP -AsBuiltConfigFilePath "$($env:HOME)\script\AsBuiltReport.json" -OutputFolderPath "$($env:HOME)\" -Target 192.168.5.70 -Format HTML -EnableHealthCheck -Credential $Cred -ReportConfigFilePath "$($env:HOME)\script\AsBuiltReport.NetApp.ONTAP.json" +``` \ No newline at end of file