@@ -5,7 +5,7 @@ function Get-AbrOntapClusterLicense {
55 . DESCRIPTION
66
77 . NOTES
8- Version: 0.4 .0
8+ Version: 0.5 .0
99 Author: Jonathan Colon
1010 Twitter: @jcolonfzenpr
1111 Github: rebelinux
@@ -23,32 +23,37 @@ function Get-AbrOntapClusterLicense {
2323 }
2424
2525 process {
26- $License = Get-NcLicense
27- if ($License ) {
28- $LicenseSummary = foreach ($Licenses in $License ) {
29- $EntitlementRisk = Get-NcLicenseEntitlementRisk - Package $Licenses.Package
30- [PSCustomObject ] @ {
31- ' Name' = $Licenses.Owner
32- ' Package' = $Licenses.Package
33- ' Type' = $Licenses.Type
34- ' Description' = $Licenses.Description
35- ' Risk' = $EntitlementRisk.Risk
26+ $Nodes = Get-NcNode - Controller $Array
27+ foreach ($Node in $Nodes ) {
28+ Section - Style Heading3 " $Node License Usage" {
29+ Paragraph " The following section provides per node installed licenses on $ ( $ClusterInfo.ClusterName ) ."
30+ BlankLine
31+ $License = Get-NcLicense - Owner $Node - Controller $Array
32+ if ($License ) {
33+ $LicenseSummary = foreach ($Licenses in $License ) {
34+ $EntitlementRisk = Get-NcLicenseEntitlementRisk - Package $Licenses.Package - Controller $Array
35+ [PSCustomObject ] @ {
36+ ' License' = $TextInfo.ToTitleCase ($Licenses.Package )
37+ ' Type' = $TextInfo.ToTitleCase ($Licenses.Type )
38+ ' Description' = $Licenses.Description
39+ ' Risk' = ConvertTo-EmptyToFiller $EntitlementRisk.Risk
40+ }
41+ }
42+ if ($Healthcheck.License.RiskSummary ) {
43+ $LicenseSummary | Where-Object { $_ .' Risk' -like ' medium' -or $_ .' Risk' -like ' unknown' -or $_ .' Risk' -like ' unlicensed' } | Set-Style - Style Warning - Property ' Risk'
44+ $LicenseSummary | Where-Object { $_ .' Risk' -like ' High' } | Set-Style - Style Critical - Property ' Risk'
45+ }
46+ $TableParams = @ {
47+ Name = " License Usage - $ ( $Node ) "
48+ List = $false
49+ ColumnWidths = 25 , 15 , 38 , 22
50+ }
51+ if ($Report.ShowTableCaptions ) {
52+ $TableParams [' Caption' ] = " - $ ( $TableParams.Name ) "
53+ }
54+ $LicenseSummary | Table @TableParams
3655 }
3756 }
38- if ($Healthcheck.License.RiskSummary ) {
39- $LicenseSummary | Where-Object { $_ .' Risk' -like ' low' } | Set-Style - Style Ok - Property ' Risk'
40- $LicenseSummary | Where-Object { $_ .' Risk' -like ' medium' -or $_ .' Risk' -like ' unknown' } | Set-Style - Style Warning - Property ' Risk'
41- $LicenseSummary | Where-Object { $_ .' Risk' -like ' High' } | Set-Style - Style Critical - Property ' Risk'
42- }
43- $TableParams = @ {
44- Name = " License Summary - $ ( $ClusterInfo.ClusterName ) "
45- List = $false
46- ColumnWidths = 30 , 20 , 10 , 28 , 12
47- }
48- if ($Report.ShowTableCaptions ) {
49- $TableParams [' Caption' ] = " - $ ( $TableParams.Name ) "
50- }
51- $LicenseSummary | Table @TableParams
5257 }
5358 }
5459
0 commit comments