Microsoft Virtualization Discussions

What would YOU like to see in the Data ONTAP PowerShell Toolkit?


The initial response to the Data ONTAP PowerShell Toolkit has been tremendous, but that doesn't mean we have all the answers!  We've only begun to tap the enormous potential of PowerShell, and the combination of this Toolkit with other 3rd-party modules (HyperV, PowerCLI, etc.) is where things really get interesting.  Here's your opportunity to tell us how you'd like to use the Toolkit and how we can improve it to help you get there.

I'll offer a few things we're already considering:

  • Snapvault
  • Consistency group
  • Snapshot multicreate
  • Reallocate
  • System.DateTime values in addition to Int64 values
  • Find-NaController (discover controllers on the network, including new, unconfigured ones)


120 REPLIES 120


Another item for the list:  The get-* commands can take a very long time to run.  It would be nice to have the ability to only gather certain parts.  Get-navol or get-naefficiency are good examples that pull much more data than the admin could possibly use for any one script. The -terse option helps but maybe other options could be added. 



The time taken by most of the getter cmdlets is proportional to the time taken by Data ONTAP to assemble and transmit the data.  Clustered Data ONTAP is far superior in this regard, as it supports controller-side filtering as you describe.  The cDOT APIs support queries that limit not only which objects are returned, but also which fields are populated; the Toolkit's cDOT cmdlets support that capability.


Creating a Failover-Group in cDOT would be good.


2 things/questions:

1. It doesn't look like there's a Start-NaReallocate(or any cmdlets involving reallocate) equivalent for cDot PS kit.  Is there an alternative?(I can think of invoke-ncssh but I'd think doing this the "PS way", which I think of as Start-NcReallocate/Stop-NcReallocate type of approach would be preferable).  If this could be implemented in that way, that'd be great.

2. Is there a plan to implement the stats and its subcommands into PS cmdlet?  We're looking to supplement performance monitoring of our cDOT cluster beyond what DFM already does due to there being a gap in how DFM monitors 7-mode and cDOT filers, and it doesn't look like get-ncperf* cmdlets is going to generate the data I'm looking for since there's no start/stop in those commands and the output from running those commands seemed to confirm what I assumed, which is that there's nothing running for Powershell that's generating perf data on interval on these filers. 



I would like to see a secure PowerShell script that could be used to gracefully shutdown a any filer or HA pair it would need to be written so that it could be executed either by a user with minimal privileges or from a UPS monitoring system (ie. APC).


Hi, Ken.  You want a user with minimal privileges to be able to shut down your storage controllers?!  Hmmm, OK.

Using clustered Data ONTAP, you could cache the credentials using Add-NcCredential -SystemScope.  Then any user on that Windows host could connect to a cluster and use Stop-NcNode.


Classification: Not VA Sensitive// Not VA Record


My preference is to create a minimally privileged user account that could

then be called from a PowerShell script. This user account could then be

utilized by operational staff to shutdown a filer or HA pair in the event of

emergency. My environment contains a mix of 2040's, 3020's, 3160 HA pairs

and 6080 HA pairs all of which are operating in 7-mode with a planned

transition to Clustermode within the next year. I have been getting

conflicting stories on the role requirements to halt a filer.

Kenneth R. Bunce, CISSP

Systems Engineer, Service Design and Implementation (Contractor)

VA Network Security Operations Center (VA NSOC)

Office of Information Security

Voice: (708) 938-1234 Extension 304.003.5918

Email: <>

Confidentiality Note: This e-mail is intended only for the person or entity

to which it is addressed, and may contain information that is privileged,

confidential, or otherwise protected from disclosure. Dissemination,

distribution, or copying of this e-mail or the information herein by anyone

other than the intended recipient is prohibited. If you have received this

e-mail in error, please notify the sender by reply e-mail, and destroy the

original message and all copies.

Classification: Not VA Sensitive
Not VA Record

This message has been categorized by Bunce, Ken (Triple-i/VA-NSOC) on

Friday, May 24, 2013 at 12:53:32 in accordance with VA Handbook 6500


Clinton -

First, let me say that I love Powershell for Netapp.  I've written some cool stuff with it with all your help.

Now for the wish list. 

Native powershell cmdlets for vscan stats and cifs stat.  I'm particularly interested because of pBlk exhaustion.

Also, for vscan, we have a vfiler report that runs which gives us a dashboard view of vfilers/aliases, but a column for vscan status would be cool.  I don't feel like using invoke-nassh and massaging that data.

All in all, it's pretty suite.


Aside the bugs around CIFS shares' properties, I would love to see a PS Toolkit also for DFM/OC. OC gathers and compute lots of valuable data, and it would be good to be able to run some cmdlets like "get-naefficiency" against DFM instead of querying all Filers.


I'd like to be able to enable compression when setting up a new snapmirror relationship using powershell.  I'm guessing this would be a feature request associated with the Set-NaSnapMirrorSchedule CMDLet.  Currently I can only update the snapmirror.conf with the source, destination and schedule details.  I then have to go back and manually add the compression enabled option. 


vfiler comandlet to list vfiler volumes and list volumes owning vfiler

list volumes :vfiler status -r

find volume containing vfiler :qtree status -v volume


How about real Powershell help.

So that

get-help Get-NaVolMove

shows the real help which is now only available via webhelp.

Should not be too hard to implement since this is a standard feature aloso available for scripts, functions,...


The help information found in the webhelp is available using PowerShell's Get-Help cmdlet.  Using your example:

PS C:\Users\Administrator> Get-Help Get-NaVolMove




    Obtain the status of a volume move.  If a volume name is not specified, all in progress volume move operations are



    Get-NaVolMove [[-Volume] <String>] [-Controller <NaController>] [<CommonParameters>]


    Obtain the status of a volume move.  If a volume name is not specified, all in progress volume move operations are






    To see the examples, type: "get-help Get-NaVolMove -examples".

    For more information, type: "get-help Get-NaVolMove -detailed".

    For technical information, type: "get-help Get-NaVolMove -full".

If this does not work for you, I would suggest re-installing the latest version of the toolkit.

Hope that helps!



I have not been working much with modules, now that i know it should work, i was able to find the reason:

I have an German XP and had to rename the folder from en-EN to de-DE

Thank you!



I'm just getting started with some powershell scripts.  I'm currently getting some reporting from the get-nasnapmirror command.  The one thing that I would love to get somehow is the compression ratio of the last snapmirror.  I know the only way to get this currently is by running the snapmirror status -l command while the snapmirror is happening, but I'd love to see a way to get this information for at least the last snapmirror transfer after the fact.  It would be even cooler if the transfer compression ratio could be listed on each of the snaps on the destination volume (get-nashapshot command.)


You have Restore-NaSnapshotFile and  Restore-NaSnapshotVolume (hopefully I am missing something)

In between you have 99% of what you might want to do script wise. One file? Use the GUI. A whole volume? I call that DR.

It is quite tedious when what needs to be restored is a couple of large sub-folders (1GB+) with 1000s of files in them.

At the very least you need a way to get files that are in a snapshot.

Then this (fictitious) command might be ok.

Get-NASnapshotListing -path /vol/nas/somesharedfolder/subfolder -snapname nightly.1 | Restore-NaSnapshotFile -snapname nightly.1



I think you could do that with the provider.

Mount-NaController -Name NTAP -Root /vol/nas/somesharedfolder/subfolder/.snapshot/nightly.1

Get-ChildItem NTAP:\ |
    Where-Object {$_.Type -eq 'file'} |
    Foreach-Object {

        Restore-NaSnapshotFile -Path $_.PSPath.split(':')[2] -snapname nightly.1




Ok, Guess I need to read better. At first this did not work but I realized I was still on 1.2 but after upgrade to 1.4 you idea works well.



No problem, I'm glad it worked for you.  Keep those idea's comming there has to be something we haven't implemented yet.




great kit

i would like to see a command that can return all notifcations in a text based form so i can parse these via normal pshell methods

ie.                    Get-NaNotifications -severity

this would allow me to get notifications from the storage and present them on a central screen we use to display all the enviroment to different teams within the business

i cannot see a similiar command or easy method to do thia within the existing cmdlets

i read a thread above that mentioned the Read-NAFile  and maybe this could be used to collect the logs , however i an uncertain of where the notifications u see in the operations manager are stored ...are they in syslog ?


NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner