#Read-NcFile : The 'Accept' header must be modified using the appropriate property or method.

1 messages · Page 1 of 1 (latest)

echo crown
#

Hello,
I have a script that reads the ems file using this command: "Read-NcFile "/vol/vol0/etc/log/ems" -VserverContext nodename"
This command stopped working when I'm working on the new powershell toolkit w/ Ontap 9.14:

Read-NcFile "/vol/vol0/etc/log/ems" -VserverContext aff2-01
Read-NcFile : The 'Accept' header must be modified using the appropriate property or method.
Parameter name: name
At line:1 char:1

  • Read-NcFile "/vol/vol0/etc/log/ems" -VserverContext aff2-01
  •   + CategoryInfo          : NotSpecified: (:) [Read-NcFile], ArgumentException
      + FullyQualifiedErrorId : The 'Accept' header must be modified using the appropriate property or method.
    

Parameter name: name,DataONTAP.C.PowerShell.SDK.Cmdlets.File.ReadNcFile

Any ideas?

Thanks

wheat locust
#

I will likely be a victim of this…

gilded gazelle
#

My guess is it's missing 'Accept: * / *

As a workaround - you could use Invoke-WebRequest and download the EMS log through the SPI interface:

https://<clusterip>/spi/<nodename>/etc/log/ems