PS C:\Users\########> $global:CurrentNcController
Name Address Vserver Version
---- ------- ------- -------
systemname xxx.xxx.xxx.xxx NetApp Release 9.10.1P11: Thu Feb 23 06:55:33 UTC 2023
PS C:\Users\########> $global:CurrentNcController.TimeoutMsec = 600000
PS C:\Users\########> Get-NcSnapshot -Volume vol0_SVM01
Get-NcSnapshot : Object reference not set to an instance of an object.
At line:1 char:1
+ Get-NcSnapshot -Volume vol0_SVM01
+ CategoryInfo : NotSpecified: (:) [Get-NcSnapshot], ArgumentException
+ FullyQualifiedErrorId : Object reference not set to an instance of an object.,DataONTAP.C.PowerShell.SDK.Cmdlets.Snapshot.GetNcSnapshot
For a ONTAP 9.12.1 System you get the message "WARNING: Record doesn't exist" even if there are Snapshots on the System.
The issue occurs on systems with low load and with high load equally. Even the model plattform can be varied.
I see the same problem with a different command, Get-NcQuotaReport, in a custom volume, qtree, aggregate report after an upgrade from PSTK 9.8 to 9.12. I'm trying to get ready for the end of ONTAPI calls, but it seems not everything is working. The temporary solution for me was found in another topic, which was to do a Connect-NcController with the -ONTAPI switch at the end. Not much of a workaround, but at least it proves I'm not crazy. ONTAP version 9.11.1P4.
Recently, I have performed some extensive testing to get our current set of Powershell scripts working with REST API. Using PSTK v220.127.116.116
I have thus far been disappointed by the results.
On the positive side, the very basic functionality is there. You can use the same cmdlets with REST and ONTAPI and they work at a basic level. PSTK hides the complexity of the underlying calls and provides a consistent set of cmdlets.
On the not-so-great side, many common cmdlets (get-ncvol, get-ncvserver to name a few) do not return all of the properties with REST which they do with ONTAPI. Since my scripts require these properties to be returned, I am unable to use the REST API and have to specify -ONTAPI for many of my calls.
There are other issues with REST, among them:
REST calls in some cases are noticeably slower than ONTAPI,
The help pages for the cmdlets in many cases have not been fully updated to match the cmdlet (example the -ONTAPI option is not even mentioned),
Some cmdlets behave differently with REST than with ONTAPI
I would be happy to share specific cmdlets which I have tested and which are inconsistent between REST and ONTAPI
In short, if Netapp expects us to migrate to REST, they are going to have to develop their cmdlets for more consistent functionality and performance between REST and ONTAPI
Hello, i have also the same problem after upgrade to 9.12.1P5 get-ncsnapshot like before. i use for exemple this command Get-NcSnapshot -Volume *P* to find snapshot on volume with "P" . It doesn't work anymore