I have been attempting to get started with teh above version of PSTK, to get away from ZAPI and onto REST. I have set up a clean Windows environment and installed the PSTK module. My test cluster is running OnTAP 9.10.1p8. I can connect just fine to it using ZAPI; but when I try to use this version of the toolkit, I get 401 authorization error. The user I am using has an admin role, so should have access to all APIs. I have been trying to find some specific documentation/examples, but have not found any yet. I hve a lot of background with PSTK and ZAPI, so I just need to know what is different using REST. Can anyone direct me to some use examples? Is 'connect-nccontroller' still used with REST?
... View more
Using 188.8.131.528 toolkit. I am connecting to the controller with this which works just fine: Connect-NcController -Name MYNETAPP -HTTPS -ONTAPI Name Address Vserver Version ---- ------- ------- ------- MYNETAPP x.x.x.x NetApp Release 9.10.1P6: Fri Jul 01 12:06:33 UTC 2022 But when I issue a Add-NCCifsShare command I get this: PS C:\Windows\system32> Add-NcCifsShare -Name qt_myshare1_mirror$ -Path /MYNETAPP_vol_myshare1_mirror/qt_myshare1 -VserverContext MYVSERVER Add-NcCifsShare : HomeDirectory parameter specified, which is not supported for ONTAPI call At line:1 char:1 + Add-NcCifsShare -Name qt_myshare1_mirror$ -Path /MYNETAPP_vol_mysh ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Add-NcCifsShare], ArgumentException + FullyQualifiedErrorId : HomeDirectory parameter specified, which is not supported for ONTAPI call,DataONTAP.C.Po werShell.SDK.Cmdlets.Cifs.AddNcCifsShare I am not specifying the "HomeDirectory" parameter. Anyone else encountered this? This command worked fine in an earlier version of the toolkit (9.6). I read this article and will try the suggestion given there and report back. Solved: PowerShell Toolkit 184.108.40.2068 - iSCSI command not working - NetApp Community use Invoke-NcSsh or Invoke-NcSystemApi Thank you, christybiskit
... View more
I'm trying to create a script to add Snapmirror-Labels to snapshots that don't have one. Although i'm able to get a list of snapshots by Get-NcSnapshot, selecting a single snapshot by this command runs to a "operation timed out". -PowerShell ToolKit Version 220.127.116.118 -Cluster/Ontap Version 9.10.1P7 -OS: Windows 10 22H2 Running the command as follows Get-NcSnapshot -Volume nfs_vmware3_vault | Select Name,Volume,Vserver,SnapmirrorLabel returns a proper list: Name Volume Vserver SnapmirrorLabel
---- ------ ------- ---------------
VeeamSnapVault_nfs_vmware3_monthly.2021-11-01_0001 nfs_vmware3_vault svm-nfs-dr
VeeamSnapVault_nfs_vmware3_monthly.2021-12-01_0001 nfs_vmware3_vault svm-nfs-dr
VeeamSnapVault_nfs_vmware3_monthly.2022-09-01_0001 nfs_vmware3_vault svm-nfs-dr
VeeamSnapVault_nfs_vmware3_monthly.2022-10-01_0001 nfs_vmware3_vault svm-nfs-dr trying to fetch a single object of these: Get-NcSnapshot -Volume nfs_vmware3_vault -SnapName VeeamSnapVault_nfs_vmware3_monthly.2022-10-01_0001 | Select Name,Volume,Vserver,SnapmirrorLabel runs into a timeout: Get-NcSnapshot : The operation has timed out
At line:1 char:1
+ Get-NcSnapshot -Volume nfs_vmware3_vault -SnapName VeeamSnapVault_nfs ...
+ CategoryInfo : NotSpecified: (:) [Get-NcSnapshot], ArgumentException
+ FullyQualifiedErrorId : The operation has timed out,DataONTAP.C.PowerShell.SDK.Cmdlets.Snapshot.GetNcSnapshot as of this, i'm not able so set a snapmirror label by "Set-NcSnapShot -snapmirrorlabel "xy"... am i doing something wrong or is this a bug?
... View more
Dear PowerShell community, We are glad to announce the release of the NetApp® ONTAP® 18.104.22.1688 PowerShell Toolkit. What’s New Toolkit introduces REST API functionality for cmdlets to support ONTAP features available through 9.11.1 through both REST and ZAPI. Toolkit has not made any changes to existing support for ZAPI calls. PSTK cmdlets use REST API by default from ONTAP 9.10.1 release onwards Toolkit has not made any changes to existing support for ZAPI calls. To execute cmdlets by using ZAPI calls, use the -ONTAPI parameter like below: Connect-NcController ControllerIP Get-NcVserver -Name vs0 -ONTAPI Set a global connection to execute all cmdlets using ZAPI calls use the -ONTAPI parameter at connection level like below: Connect-NcController ControllerIP -ONTAPI Get-NcVserver -Name vs0 PowerShell Toolkit Upgrade and Backward Compatibility The toolkit name has been changed from DataONTAP to NetApp.ONTAP. To provide backward compatibility i.e. existing scripts compatibility and to allow users to import the module using the previous name, complete the following steps: PowerShell Gallery Use cmdlet uninstall-module DataONTAP if an older package is available. Use cmdlet install-module NetApp.ONTAP to install the ONTAP 22.214.171.1248 package. Execute the following two commands. Before executing these commands, ensure that “C:\Program Files\WindowsPowerShell\Modules\NetApp.ONTAP” exists. This is the default location where the PowerShell gallery install module resides. If this location has been updated, update the path accordingly. New-Item -ItemType SymbolicLink -Path ("C:\Program Files\WindowsPowerShell\Modules\DataONTAP") -Target ("C:\Program Files\WindowsPowerShell\Modules\NetApp.ONTAP") New-Item -ItemType SymbolicLink -Path ("C:\Program Files\WindowsPowerShell\Modules\DataONTAP\126.96.36.1998\DataONTAP.psd1") -Target ("C:\Program Files\WindowsPowerShell\Modules\DataONTAP\188.8.131.528\NetApp.ONTAP.psd1") Once the commands have completed, import the module using both names “DataONTAP” and “NetApp.ONTAP”. NetApp ToolChest Download the package from the ToolChest. Extract the package. Execute Install.ps1 and enter the location where you want to update the existing package or do a fresh installation. Once the command has completed, import the module using both names “DataONTAP” and “NetApp.ONTAP”. For more details refer to PowerShell Toolkit Installation Guide Toolkit can be downloaded from PowerShell Gallery as well. Regards, NetApp PowerShell Toolkit Team
... View more