PowerShell: NetApp DataONTAP Toolkit v1.3 A PSProvider done right!

Within the PowerShell community there has been a lingering debate over modules and providers.  Initially everyone seemed compelled to do both. Personally, I’ve never been very impressed by third party providers.  Mainly because they always felt like a gimmick.  They forced the file system analog, and the results where not very good. They were buggy, slow, and didn’ t support the standard provider hooks.  This lead to many vendors never bothering, and focused instead on cmdlets.  I myself had come to the conclusion that providers where something for the PowerShell team, and third party ISV should just leave them alone.  Fortunately the provider in version 1.3 of the DataONTAP PowerShell toolkit has broken the mold and renewed my faith in providers!

First of all PSDrives have always been a little jenky.  Not the fault of the PowerShell team, but I’ve never found the New-PSDrive cmdlet particularly intuitive.  NetApp worked around this hurdle by simply providing a cmdlet to do all the heavy lifting for you.  For example to create a PSDrive to NTAP01 you could run.

Of course, if you prefer a challenge you could still use the built in cmdlet.  The only downside here would be you can only connect to the filer in your global scope.  Meaning you cannot connect to multiple filers at once.

Either way once you’ve connected you will have two top level “folders”.  The etc folder and the vol folder, they are exactly what you think they are.   Now here is where it gets really cool!  Using the toolkit you programatically interact with the internal file system regardless of the protocol or format!  For instance a LUN is represented as a file, Qtrees are folders, etc, etc…  The only part of the system not represented is the aggregate itself.

This enables some really powerful stuff as you can effectively access any part of the file system regardless of the ACL on that file system.   Now you can’t copy or move anything, but that’s about the only thing you can’t do!

For instance you can Create files/folders.

mkdir where_did_this_come_from

As well as read the contents of any plain text files.

Finally we can remove any Files or Folders as well.

Now this brings incredible power to the storage administrator… Of course this really isn’t anything new.  It’s all been available from the console for years, but to get these capabilities within the native tools shows NetApp’s continued resolve to deliver a first class PowerShell experience!  All that said, it’s not perfect. There are some I/O hooks that are still missing. For instance there is no filtering support for Get-Content, and the exclusion of a FullName property breaks some pipeline stuff, but this is all fixable, and knowing these guys, those limitations will be removed by the next release!

Again Congratulations to the DataONTAP Development team as 1.3 is not only another solid build, but they quietly slipped in one of the most capable 3rd party providers I’ve seen to date!


Leave a Reply