Welcome back, As promised earlier, I am back with the new blog series. So let’s get started.
Note: From, Hereon I will be using abbreviation PSTK for ‘NetApp PowerShell ToolKit’, as the same has been referred on NetApp documentation as well.
What is Netapp PowerShell ToolKit?
NetApp PowerShell Tool Kit (PSTK) is a PowerShell Toolkit packaged with 2 PowerShell Modules which are DataOntap and SANTricity. DataOntap module helps in managing NetApp Storage devices which are managed by the ONTAP management system- such as FAS, AFF, and NetApp Cloud, etc. SANTricity module is used to manage E-Series Storage array and EF-Series flash array. In this blog series, I will be focusing only on the DataOntap PowerShell module.
I am highlighting some of the specifications of PSTK here,
Platform: Windows only, Requires PowerShell 3.0 or above and .net 4.5 or above
Is it available on PSGallary? No, Not yet. This means that you can not download it from Install-Module cmdlet of PowerShell
PowerShell Core: No, It does not support PowerShell core yet. So you can’t use this on the Linux Platform yet.
# of cmdlets: 2300 or more for DataOntap Module and ~300 for SANTricity Module.
Why should I learn PSTK?
If you are a Storage admin/Engineer then you would discover that working on PowerShell gives you greater flexibility and automation capabilities compare to any other shell environment. If you have already worked with PowerShell then it’s great. You can simply start using the PSTK module. If you haven’t worked with PowerShell then know this, PowerShell is the simplest scripting platform available for us. Invest some time and you will get it. 🙂
- PowerShell is primarily a tool for administrators like us
- PSTK is just a PowerShell module, so if you are already working on any other PowerShell module than you almost require zero additional skillsets to start working on PSTK or any other module in that case
- The same script can help you to orchestrate things related to the different technology stack. For example, the same script can create a LUN with the help of the DataOntap PowerShell module and further creates a datastore in VMware with the help of PowerCLI (PowerShell Module for VMware vSphere)
- Everything in PowerShell is an object
- PowerShell’s command discoverability makes it easy to transition from typing commands interactively to creating and running scripts
How to Install?
Download the .msi installer file and click on install. Ensure you are running with PowerShell 3.0 or above version.
If you are running PowerShell 4.0 or above, By default module will be imported the moment you execute any of the commands which are part of that respective module. However, use below cmdlet if you want to import the module into the Powershell session.
Get-module -ListAvailable -Name DataOntap |Import-Module
Below cmdlet will list all the commands which are available to use from DataOntap Module.
#List all the command which are in Dataontap module Get-Command -Module DataOntap #List command with a specific filter with Name parameter in DataOntap Module #Below ex. will list all the commands which has ncController in its name Get-Command -Name *ncController* -Module DataOntap #Returns total Number of commands in Dataontap Module (Get-Command -Module DataOntap).count
If you are entirely new to the PowerShell then I would highly recommend you to refer PowerShell documentation to start your learning with Powershell.