Skip to content

Commit a960225

Browse files
committed
Removed Pwsh v5.1 support
1 parent 80b9d22 commit a960225

File tree

122 files changed

+614
-917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+614
-917
lines changed

AsBuiltReport.NetApp.ONTAP.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"EnableDiagramSignature": false,
2626
"DiagramColumnSize": 4,
2727
"SignatureAuthorName": "",
28-
"SignatureCompanyName": ""
28+
"SignatureCompanyName": "",
29+
"UpdateCheck": true
2930
},
3031
"InfoLevel": {
3132
"_comment_": "0 = Disabled, 1 = Enabled, 2 = Adv Summary",

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
- Add `Node Name` to FCP Interfaces section in FCP Vserver configuration
1717
- Apply powershell best practices
1818
- Add ConvertTo-HashToYN function
19+
- Add EMS configuration setting health check
1920

2021
### Changed
2122

@@ -29,6 +30,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2930
- Fix model property assignment in Get-AbrOntapStorageAggrDiagram function
3031
- Fix Volume SnapShot Configuration section showing healthcheck for non violated item
3132

33+
### Removed
34+
35+
- Removed Pwsh v5.1 support
36+
3237
## [0.6.11] - 2025-11-07
3338

3439
### Added

Src/Private/ConvertTo-HashToYN.ps1

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
function ConvertTo-HashToYN {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to convert array content true or false automatically to Yes or No.
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.2.0
9+
Author: Jonathan Colon
10+
11+
.EXAMPLE
12+
13+
.LINK
14+
15+
#>
16+
[CmdletBinding()]
17+
[OutputType([System.Collections.Specialized.OrderedDictionary])]
18+
param (
19+
[Parameter (Position = 0, Mandatory)]
20+
[AllowEmptyString()]
21+
[System.Collections.Specialized.OrderedDictionary] $TEXT
22+
)
23+
24+
$result = [ordered] @{}
25+
foreach ($i in $TEXT.GetEnumerator()) {
26+
try {
27+
$result.add($i.Key, (ConvertTo-TextYN $i.Value))
28+
} catch {
29+
$result.add($i.Key, ($i.Value))
30+
}
31+
}
32+
if ($result) {
33+
return $result
34+
} else { return $TEXT }
35+
}

Src/Private/ConvertTo-TextYN.ps1

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
function ConvertTo-TextYN {
2+
<#
3+
.SYNOPSIS
4+
Used by As Built Report to convert true or false automatically to Yes or No.
5+
.DESCRIPTION
6+
7+
.NOTES
8+
Version: 0.2.0
9+
Author: LEE DAILEY
10+
11+
.EXAMPLE
12+
13+
.LINK
14+
15+
#>
16+
[CmdletBinding()]
17+
[OutputType([String])]
18+
param
19+
(
20+
[Parameter (
21+
Position = 0,
22+
Mandatory)]
23+
[AllowEmptyString()]
24+
[string]
25+
$TEXT
26+
)
27+
28+
switch ([string]::IsNullOrEmpty($TEXT)) {
29+
$true { '--' }
30+
$false {
31+
switch ($TEXT) {
32+
'True' { 'Yes'; break }
33+
'False' { 'No'; break }
34+
default { $TEXT }
35+
}
36+
}
37+
default { '--' }
38+
}
39+
} # end

Src/Private/Export-AbrOntapDiagram.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Export-AbrOntapDiagram {
55
.DESCRIPTION
66
Documents the configuration of NetApp Ontap in Word/HTML/Text formats using PScribo.
77
.NOTES
8-
Version: 0.6.8
8+
Version: 0.6.12
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux

Src/Private/Get-AbrOntapCluster.ps1

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapCluster {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.6.8
8+
Version: 0.6.12
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -35,16 +35,12 @@ function Get-AbrOntapCluster {
3535
'Cluster UUID' = $ClusterInfo.ClusterUuid
3636
'Cluster Serial' = $ClusterInfo.ClusterSerialNumber
3737
'Cluster Controller' = $ClusterInfo.NcController
38-
'Cluster Contact' = ConvertTo-EmptyToFiller $ClusterInfo.ClusterContact
39-
'Cluster Location' = ConvertTo-EmptyToFiller $ClusterInfo.ClusterLocation
38+
'Cluster Contact' = $ClusterInfo.ClusterContact
39+
'Cluster Location' = $ClusterInfo.ClusterLocation
4040
'Ontap Version' = $ClusterVersion.value
4141
'Number of Aggregates' = $ArrayAggr.count
4242
'Number of Volumes' = $ArrayVolumes.count
43-
'Overall System Health' = switch ([string]::IsNullOrEmpty($ClusterDiag.Status)) {
44-
$true { '--' }
45-
$false { $ClusterDiag.Status.ToUpper() }
46-
default { 'Unknown' }
47-
}
43+
'Overall System Health' = ${ClusterDiag}?.Status?.ToUpper()
4844
}
4945
if ($Healthcheck.Cluster.Summary) {
5046
$ClusterSummary | Where-Object { $_.'Overall System Health' -like 'OK' } | Set-Style -Style OK -Property 'Overall System Health'

Src/Private/Get-AbrOntapClusterASUP.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapClusterASUP {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.6.7
8+
Version: 0.6.12
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux
@@ -32,7 +32,7 @@ function Get-AbrOntapClusterASUP {
3232
$Inobj = [ordered] @{
3333
'Node Name' = $NodesAUTO.NodeName
3434
'Protocol' = $NodesAUTO.Transport
35-
'Enabled' = ConvertTo-TextYN $NodesAUTO.IsEnabled
35+
'Enabled' = $NodesAUTO.IsEnabled
3636
'Last Time Stamp' = $NodesAUTO.LastTimestampDT
3737
'Last Subject' = $NodesAUTO.LastSubject
3838
}

Src/Private/Get-AbrOntapClusterDiagram.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Get-AbrOntapClusterDiagram {
55
.DESCRIPTION
66
77
.NOTES
8-
Version: 0.6.8
8+
Version: 0.6.12
99
Author: Jonathan Colon
1010
Twitter: @jcolonfzenpr
1111
Github: rebelinux

Src/Private/Get-AbrOntapClusterHA.ps1

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,9 @@ function Get-AbrOntapClusterHA {
3131
$ClusterHa = Get-NcClusterHa -Node $Nodes.Node -Controller $Array
3232
[PSCustomObject] @{
3333
'Name' = $Nodes.Node
34-
'Partner' = switch ([string]::IsNullOrEmpty($ClusterHa.Partner)) {
35-
'True' { '-' }
36-
'False' { $ClusterHa.Partner }
37-
default { 'Unknwon' }
38-
}
39-
'TakeOver Possible' = ConvertTo-TextYN $ClusterHa.TakeoverPossible
40-
'TakeOver State' = switch ([string]::IsNullOrEmpty($ClusterHa.TakeoverState)) {
41-
'True' { '-' }
42-
'False' { $ClusterHa.TakeoverState }
43-
default { 'Unknwon' }
44-
}
34+
'Partner' = $ClusterHa.Partner ?? '--'
35+
'TakeOver Possible' = $ClusterHa.TakeoverPossible
36+
'TakeOver State' = $ClusterHa.TakeoverState ?? '--'
4537
'HA Mode' = $ClusterHa.CurrentMode
4638
'HA State' = $ClusterHa.State
4739
}

Src/Private/Get-AbrOntapClusterLicense.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function Get-AbrOntapClusterLicense {
3636
'License' = $TextInfo.ToTitleCase($Licenses.Package)
3737
'Type' = $TextInfo.ToTitleCase($Licenses.Type)
3838
'Description' = $Licenses.Description
39-
'Risk' = ConvertTo-EmptyToFiller $EntitlementRisk.Risk
39+
'Risk' = (Get-NcLicenseEntitlementRisk -Package $Licenses.Package -Controller $Array).Risk ?? '--'
4040
}
4141
}
4242
if ($Healthcheck.License.RiskSummary) {

0 commit comments

Comments
 (0)