NetApp PowerShell Toolkit 9.15.1 Installation Guide
NetApp PowerShell Toolkit 9.15.1 Installation Guide
2407
Installation Guide
July 2024
TABLE OF CONTENTS
Overview ............................................................................................................................................... 2
Installation guide................................................................................................................................... 4
Version history.................................................................................................................................... 15
LIST OF TABLES
Table 1) Installation requirements for Windows ......................................................................................................... 3
Table 2) Installation requirements for Linux using RHEL ........................................................................................... 3
Table 3) Installation requirements for Linux using Ubuntu.......................................................................................... 3
Table 4) Installation requirements for macOS ............................................................................................................4
Table 5) Installation requirements for 7-Mode and ONTAP ......................................................................................... 4
Table 6) List of cmdlets that are not supported by PowerShell Toolkit 9.15.1.2407 on non-Windows operating
systems ................................................................................................................................................................. 9
Overview
NetApp® PowerShell Toolkit 9.15.1.2407 contains the PowerShell module for NetApp ONTAP®. It
supports ONTAP running on NetApp AFF or FAS systems, commodity hardware, or the cloud. The toolkit
provides end-to-end automation and storage management across ONTAP storage systems. The toolkit
also provides cross-platform support over Windows, Ubuntu, RedHat Enterprise Linux (RHEL), and
macOS.
2 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
NetApp PowerShell Toolkit
The NetApp PowerShell module contains 2,340 cmdlets, enabling the storage administration of ONTAP
systems through NetApp ONTAPI. It also contains several cmdlets aimed at storage administration on
Windows hosts, including the following major features:
• Holistic end-to-end automation and management of your data center and hybrid cloud—spanning
7mode and ONTAP running on AFF or FAS arrays in your data center, NetApp ONTAP Select
running on commodity hardware, and NetApp Cloud Volumes ONTAP instances running on the public
cloud
• Complete API coverage for ONTAP 9.15.1; backwards compatible with previous ONTAP releases
• Creation, deletion, and modification of virtual disks and files
• Virtual disk and host volume space reclamation
• Creation and modification of cluster and SVM setups, making it even simpler to initialize your ONTAP
system.
What’s new?
Hydrate parameter support in NetApp PowerShell Toolkit
The "Hydrate" parameter has been introduced to improve command execution performance by offering three
options: Yes, No, and Partial.
Yes: This is the default behavior, as it exists today. After a successful POST or PATCH request, a
GET request is made with the query parameter ?fields=**, retrieving all fields.
No: For POST or PATCH requests, it will pass ?return_records=true, and then display only the
fields that ONTAP sets, which are usually just the keys and occasionally a few additional fields.
This option is beneficial when performance is a priority and you do not need all the field details,
avoiding the retrieval of unused fields.
Partial: After a successful POST or PATCH request, a GET request is made with the query
parameter ?fields=*, retrieving a subset of fields. This option is useful for balancing performance
and the amount of data retrieved, reducing overhead by fetching only a subset of the fields.
3 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
Microsoft Windows PowerShell 5.1 or 7.3.4 and later
Microsoft .NET Framework .NET 4.7.2 Framework
Microsoft Windows 8.1,10, Server 2012 R2,
2016, 2019
Table 2) Installation requirements for Linux using RHEL.
Operating system Version
Microsoft Windows PowerShell 7.3.4 and later
RHEL 7.0 and later
Table 3) Installation requirements for Linux using Ubuntu.
Operating system Version
Microsoft Windows PowerShell 7.3.4 and later
Operating system Version
Installation guide
Windows installation
To install the PowerShell Toolkit module for Windows, follow these steps:
1. Download and install the .NET Framework, Version 4.7.2:
https://dotnet.microsoft.com/download/dotnet-framework/net472
2. Download and install the PowerShell 7MSI installer:
https://github.com/PowerShell/PowerShell/
3. Download the NetApp.ONTAP PowerShell Toolkit zip file from the NetApp Support site and extract
the contents to the directory that you want to use.
4. Open Windows PowerShell Core, or a command prompt, and run PowerShell Core:
C:\>pwsh
Or open Windows Native PowerShell.
5. Import the NetApp.ONTAP module:
PS>Import-Module <zip file directory>\NetApp.ONTAP.psd1
4 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
6. To see a list of available commands, enter the following:
PS> Get-Command -Module NetApp.ONTAP
RHEL 7.0 installation
Run the commands in a terminal session on the machine on which you want to install the software. You
can execute these commands from any directory on the machine, a specific path is not required. You
need sudo access to successfully complete the installation.
5 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
To install the PowerShell Toolkit module for RHEL, follow these steps:
1. Install PowerShell:
#dotnet tool install --global PowerShell
2. Download the NetApp.ONTAP PowerShell Toolkit zip file from the NetApp Support site and extract
the contents to the directory that you want to use.
To install the PowerShell Toolkit module for Ubuntu, follow these steps:
1. Install PowerShell:
#dotnet tool install --global PowerShell
2. Download the NetApp.ONTAP PowerShell Toolkit zip file from the NetApp Support site and extract
the contents to the directory that you want to use.
3. Open a terminal and run PowerShell Core:
#pwsh
7 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
8 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
To directly install the PowerShell Toolkit module from PowerShell Gallery, follow these steps:
1. Install the module from PowerShell Gallery:
Install-module NetApp.ONTAP.
This downloads the module to PSModule Path.
9 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
9. To see a list of available commands, enter the following:
PS> Get-Command -Module NetApp.ONTAP
Signature Verification
Verification on windows
After downloading the PSTK toolkit from NetApp support site, user can verify the signature of the
files.
To verify, right click on the downloaded files of which you want to check signature for and then open
Properties.
In the open properties windows select “Digital Signature”, It should display name of signer as
“NetApp Inc” and Timestamp of the certificate.
10 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
Change Logs
Bug Fixes
1) Get-NcQuota returning error when quota name contains “-“. FIXED
2) Get-NcEfficiency returning incorrect SnapshotUsed : FIXED
3) New-NcSnapshotMulti was not returning error when incorrect snapshot passed : FIXED
Updates
1) Get-NcSnapshot now supports wildcard volume name : UPDATE
a. Get-ncSnapshot -Volume * -SnapName <snapshot-name>
Limitations
Some of the native host features for Windows are not supported with this toolkit over Linux and Ubuntu or
other operating systems. See the following table for the list of cmdlets that are not supported in a
nonWindows environment:
Table 6) List of cmdlets that are not supported by PowerShell Toolkit 9.15.1.2407 on non-Windows operating
systems.
Cmdlet Description
Lists all disks on the local host that are served by ONTAP LUNs.
Get-NcHostDisk
Get information about the Microsoft iSCSI Initiator on the host machine.
Get-NcHostIscsiAdapter
11 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
Get the targets discovered by the iSCSI Initiator.
Get-NcHostIscsiTarget
Get a list of all Volume Shadow Copy Service (VSS) providers on the current
Get-NcVssProvider system.
Get a list of completed shadow copies in the system that reside in the given
Get-NcVssSnapshot context.
Create a VSS shadow copy NetApp Snapshot™ set for the given volumes.
Invoke-NcVssBackup
Cmdlet Description
Create a new Windows volume on an existing disk.
New-NcHostVolume
Wait for a specific disk to appear or wait for ongoing changes to the disk list
Wait-NcHostDisk to settle.
Create a LUN from a virtual hard disk (VHD) or Microsoft Hyper-V virtual hard
ConvertTo-NcLun disk (VHDX).
Convert a Virtual Machine Disk (VMDK) file, a VHDX file, a dynamic VHD file,
ConvertTo-NcVhd or an ONTAP LUN into a VHD file.
12 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
Convert a VMDK file, a fixed VHD file, or an ONTAP LUN into a VHDX file.
ConvertTo-NcVhdx
List Hyper-V virtual machines (VMs) running on the local host along with all
Get-NcHyperV ONTAP storage resources that they are using.
Get the disk partitions of the given VHD and determine if they are aligned.
Get-
NcVirtualDiskAlignment
Rapidly create a VHD file on a LUN or CIFS share mounted on a Windows host.
New-NcVirtualDisk
Cmdlet Description
13 NetApp PowerShell Toolkit 9.15.1.2407 © 2024 NetApp, Inc. All rights reserved.
Installation Guide
• Get-Help <cmdlet_name> -full to view full help for a particular cmdlet.
• Get-Help <cmdlet_name> -examples to view an example for a particular cmdlet.
How do I connect to a NetApp storage system by using PSTK?
Use cmdlets of the category system. Use the cmdlet Get-NcCommand -Category system to list
available cmdlets in this category.
How do I check the users of the controller?
Use the cmdlet: Get-NcUser
Can I send CLI commands to the controller from PSTK?
Yes. Use the cmdlet: Invoke-NcSSH, Invoke-NcCli
Can I call ONTAPI commands from PSTK?
13 NetApp PowerShell Toolkit 9.14.1.2401 Installation Guide © 2024 NetApp, Inc. All rights reserved.
• /network/fc/fabrics/{fabric.name}/switches
• /network/fc/fabrics/{fabric.name}/switches/{wwn}
• /network/fc/fabrics/{fabric.name}/zones/{name}
• /network/fc/fabrics/{name}
• /security/azure-key-vaults/{azure_key_vault.uuid}/rekey-external
• /security/azure-key-vaults/{uuid}
• /security/azure-key-vaults/{uuid}/rekey-internal
• /security/azure-key-vaults/{uuid}/restore
• /security/gcp-kms
• /security/gcp-kms/{gcp_kms.uuid}/rekey-external
• /security/gcp-kms/{uuid}
• /security/gcp-kms/{uuid}/rekey-internal
• /security/gcp-kms/{uuid}/restore
• /security/key-manager-configs
• /security/key-managers/{security_key_manager.uuid}/keys/{node.uuid}/key-ids/{key_id}
• /security/key-stores
• /support/auto-update
• /support/auto-update/configurations
• /support/auto-update/configurations/{uuid}
• /support/auto-update/updates
• /support/auto-update/updates/{uuid} /application/applications
How do I find information about which parameters are supported with ONTAPI, with REST API, or
with both?
To retrieve the complete details about a cmdlet, including parameters supported in the REST API and
ONTAPI and its supported type, enter the following:
Get-Help Get-NcVserver -Full
14 NetApp PowerShell Toolkit 9.14.1.2401 Installation Guide © 2024 NetApp, Inc. All rights reserved.
Common issues
• Issue While converting VHDs by using the cmdlets ConvertTo-NcVmdk and ConvertTo-NcVhd,
you get the following error: Source and destination offsets are not WAFL
blockaligned.
Workaround: The size of the disk must be a multiple of 4Kb. Resize the size of the disk to a multiple
of 4Kb by using the cmdlet Resize-VHD.
• Issue: While converting a dynamic VHD to VMDK by using the cmdlet ConvertTo-NcVmdk, you get
the following error: Specified argument was out of the range of valid values.
File is not a fixed-size VHD.
Workaround: PSTK does not support dynamic VHD conversion. Convert the dynamic VHD to fixed
by using the cmdlet Convert-VHD.
• Issue: While converting virtual disks with a size greater than 128MB by using cmdlets
ConvertToNcVhd and ConvertTo-NcVmdk in ONTAP 9.0 and later, you get an error mentioning
conversion failure.
Workaround: Follow these steps to resolve this known issue:
a. Take a Snapshot copy of the volume on which the VHD or VMDK resides.
b. Pass the Snapshot copy as a parameter to the cmdlet ConvertTo-NcVhd or ConvertTo-
NcVmdk
c. Delete the Snapshot copy created after the conversion operation succeeds.
• Issue: Some cmdlets throw errors that read Unable to find API with earlier releases of ONTAP
although the syntax for the cmdlet is proper.
Workaround: Some newer cmdlets are meant only for ONTAP 9.15.1 and do not work for earlier
releases of ONTAP. See the release notes for more information.
• Issue: When you use file names with non-ASCII characters ina volume, they are not handled
correctly by the cmdlets.
Workaround: Use UTF-8 instead.
Issue: You cannot load the file or assembly, log4net, Version=2.0.11.0,
Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, and cannot find or load a specific file
(0x80131621).
Workaround: This problem is caused by a log4net assembly in the Global Assembly Cache (GAC).
The assembly of another version is already present and, as a result, is causing conflict. To resolve
this issue, remove another module that consumes log4net (such as PowerCLI) and import the
NetApp.ONTAP module. For more information, see the PowerShell-ProLiant SDK issues page.
• Issue: While importing the module, you get the following error: The following error occurred
while loading the extended type data file: Error in TypeData
"DataONTAP.Types.Iscsi.IscsiPortalListEntryInfo": The member Port is
already present. Error in TypeData…
Workaround: This problem occurs when you try to import the module that is using the alias name
NetApp.ONTAP, and the session already has an imported module named DataONTAP. To resolve
this issue, remove the existing imported module.
• Issue: While executing the cmdlet Add-NcCredential on a Linux-based operating system, you get
the following error: Add-NcCredential: Could not save credentials for <xyz>.
Please try again with root user.
15 NetApp PowerShell Toolkit 9.14.1.2401 Installation Guide © 2024 NetApp, Inc. All rights reserved.
Workaround: This error occurs because there are write issues with non-root users on Linux-based
operating systems. To resolve this issue, execute the su command and enter your password. Next,
launch PowerShell 7 by using the pwsh command and execute the Add-NcCredential cmdlet.
• Issue: The -Force parameter is not supported with REST API -Force
Workaround: To use the -Force parameter, use it with the -Zapi parameter for a cmdlet.
Version history
Version Date Document history
1.0 July 2024 Installation guide
16 NetApp PowerShell Toolkit 9.14.1.2401 Installation Guide © 2024 NetApp, Inc. All rights reserved.
Copyright Information
Copyright © 2024 NetApp, Inc. All Rights Reserved. Printed in the U.S. No part of this document covered
by copyright may be reproduced in any form or by any means—graphic, electronic, or mechanical,
including photocopying, recording, taping, or storage in an electronic retrieval system—without prior
written permission of the copyright owner.
Software derived from copyrighted NetApp material is subject to the following license and disclaimer:
THIS SOFTWARE IS PROVIDED BY NETAPP “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WHICH ARE HEREBY
DISCLAIMED. IN NO EVENT SHALL NETAPP BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
NetApp reserves the right to change any products described herein at any time, and without notice.
NetApp assumes no responsibility or liability arising from the use of products described herein, except as
expressly agreed to in writing by NetApp. The use or purchase of this product does not convey a license
under any patent rights, trademark rights, or any other intellectual property rights of NetApp.
The product described in this manual may be protected by one or more U.S. patents, foreign patents, or
pending applications.
Data contained herein pertains to a commercial product and/or commercial service (as defined in FAR
2.101) and is proprietary to NetApp, Inc. The U.S. Government has a non-exclusive, non-transferrable,
non-sublicensable, worldwide, limited irrevocable license to use the Data only in connection with and in
support of the U.S. Government contract under which the Data was delivered. Except as provided herein,
the Data may not be used, disclosed, reproduced, modified, performed, or displayed without the prior
written approval of NetApp, Inc. United States Government license rights for the Department of Defense
are limited to those rights identified in DFARS clause 252.227-7015(b).
Trademark Information
NETAPP, the NETAPP logo, and the marks listed at http://www.netapp.com/TM are trademarks of
NetApp, Inc. Other company and product names may be trademarks of their respective owners.
17 NetApp PowerShell Toolkit 9.14.1.2401 Installation Guide © 2024 NetApp, Inc. All rights reserved.