Skip to content

Commit c75b442

Browse files
committed
Get-NetAppOntapAPI function do not return any data under PW5.1 #42
1 parent 8863800 commit c75b442

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Src/Private/Get-NetAppOntapAPI.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ function Get-NetAppOntapAPI {
7575

7676
Process {
7777
Try {
78-
$response = Invoke-RestMethod -Method Get -Uri ($api + $uri) -Headers $headers -SkipCertificateCheck
78+
if ($PSVersionTable.PSEdition -eq 'Core') {
79+
$response = Invoke-RestMethod -Method Get -Uri ($api + $uri) -Headers $headers -SkipCertificateCheck
80+
81+
} else {
82+
$response = Invoke-RestMethod -Method Get -Uri ($api + $uri) -Headers $headers
83+
}
7984
$response.records
8085
} Catch {
8186
Write-Verbose -Message $_

0 commit comments

Comments
 (0)