Src/Private/Get-AbrOntapVserverFcpSummary.ps1
function Get-AbrOntapVserverFcpSummary { <# .SYNOPSIS Used by As Built Report to retrieve NetApp ONTAP Vserver FCP information from the Cluster Management Network .DESCRIPTION .NOTES Version: 0.6.7 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux .EXAMPLE .LINK #> param ( [Parameter ( Position = 0, Mandatory)] [string] $Vserver ) begin { Write-PScriboMessage "Collecting ONTAP Vserver FCP information." } process { try { $VserverData = Get-NcFcpService -VserverContext $Vserver -Controller $Array $VserverObj = @() if ($VserverData) { foreach ($Item in $VserverData) { try { $inObj = [ordered] @{ 'FCP WWNN' = $Item.NodeName 'Status' = Switch ($Item.IsAvailable) { 'True' { 'Up' } 'False' { 'Down' } default { $Item.IsAvailable } } } $VserverObj += [pscustomobject]$inobj } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } } if ($Healthcheck.Vserver.FCP) { $VserverObj | Where-Object { $_.'Status' -like 'Down' } | Set-Style -Style Warning -Property 'Status' } $TableParams = @{ Name = "FCP Service - $($Vserver)" List = $false ColumnWidths = 70, 30 } if ($Report.ShowTableCaptions) { $TableParams['Caption'] = "- $($TableParams.Name)" } $VserverObj | Table @TableParams } } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } } end {} } |