Hello,
I am working on retrieve Dev NetApp Cluster information through ONTAP REST API with PowerShell.
But, when I initiate NetApp REST API though PowerShell in my laptop and got error like below.
PS C:\Users\TAC5665> $Cred = Get-Credential
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
PS C:\Users\TAC5665> $Params = @{
>> Uri = https://nasoc03.d2-tdbfg.com/api/network/ethernet/ports
>> Authentication = "Basic"
>> Credential = $Cred
>> }
PS C:\Users\TAC5665>
PS C:\Users\TAC5665> Invoke-RestMethod @Params
Invoke-RestMethod : A parameter cannot be found that matches parameter name 'Authentication'.
At line:1 char:19
+ Invoke-RestMethod @Params
+ ~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Invoke-RestMethod], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Current My laptop PowerShell version as 5.1
PS C:\Users\TAC5665> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.2364
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.2364
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1