Powershell: PoshOnTap meet world…

UPDATE: This project has been moved to codeplex, the latest build can be located here.

Okay… well I’ve written enough, and tested what I can… Time to let this baby go and see what happens!   PoshOnTap released!

What is PoshOnTap?  PoshOnTap is a collection of PowerShell V2 Advanced Functions to manage A NetApp Filer from PowerShell.  All in all the project contains 138 cmdlets covering everything from basic disk management to snapvaults and everything in between!

What isn’t PoshOnTap? PoshOnTap is not in anyway affiliated with NetApp… I wrote it, and I’m sure there are bugs!!!  I’ve tried my best to polish it all up, but at the end of the day use with caution…. i.e., if you break your production SAN, I don’t want to hear about it!  Additionally two glaring holes are the lack of cifs/NFS/FC cmdlets… I’ve been writing this for six months, and 20k + lines of code later I still haven’t gotten to them. I decided that if I tried to do it all in one swipe OnTap 8 would be released before I could finish.

The framework is very basic anything can be accomplished with the use of one class and a cmdlet, everything else is a wrapper to ease the administrative experience.

How to use:

  1. Download the source files from below, and extract to a location on your local machine.
  2. If your running all-signed you’ll need to sign the scripts prior to execution (sorry I can’t afford a code signing cert)
  3. from a Powershell V2 CTP3 prompt type: Import-Module <path>PoshOnTap.psd1

There is a short getting started doc to give you a rough idea, but this is all very raw…  My hope is that the community can pick this up, and bring it all that last mile.  Adam provided the idea with Powershell OnTap, and I hope I’ve provided a base!   I will blog some example uses next week, but in the interim.

Have at it!

~Glenn

UPDATE: this project has been superceeded by it’s big brother PoshOnTap v2 www.codeplex.com/poshontap

[25]PS > Get-Command “-Na

CommandType     Name
———–     —-
Function        Add-NaDisk
Function        Add-NaInitiator
Function        Add-NaISCSIAuthentication
Function        Add-NaLicense
Function        Add-NaPort
Function        Add-NaTPGroupInterface
Function        Clear-NaISCSIAlias
Function        Clear-NaISCSIStats
Function        Disable-NaCluster
Function        Disable-NaClusterNegotiatedFailover
Function        Disable-NaISCSIInterface
Function        Enable-NaCluster
Function        Enable-NaClusterNegotiatedFailover
Function        Enable-NaISCSIInterface
Function        Get-NaAggr
Function        Get-NaAggrFilerInfo
Function        Get-NaAggrOptions
Function        Get-NaCluster
Function        Get-NaDate
Function        Get-NaDisk
Function        Get-NaFlexCloneSplit
Function        Get-NaIGroup
Function        Get-NaISCSIAlias
Function        Get-NaISCSIAuthentication
Function        Get-NaiscsiConnections
Function        Get-NaISCSIDefaultAuthentication
Function        Get-NaISCSIInitiators
Function        Get-NaISCSIInterface
Function        Get-NaISCSINodeName
Function        Get-NaISCSIPortal
Function        Get-NaISCSIService
Function        Get-NaISCSISessions
Function        Get-NaISCSIStats
Function        Get-NaISNS
Function        Get-NaLicense
Function        Get-NaLun
Function        Get-NaLunMap
Function        Get-NaOption
Function        Get-NaPortSet
Function        Get-NaRootVol
Function        Get-NaScrub
Function        Get-NaSnapshot
Function        Get-NaSnapshotAutoDelete
Function        Get-NaSnapshotReserve
Function        Get-NaSnapshotSchedule
Function        Get-NaSystemAvailableReplicationTransfers
Function        Get-NaSystemInfo
Function        Get-NaTimeZone
Function        Get-NaTPGroup
Function        Get-NaVerify
Function        Get-NaVol
Function        Get-NaVolAutoSize
Function        Get-NaVolCharmap
Function        Get-NaVolOptions
Function        Get-NaVolSize
Function        Measure-NaFlexCloneSplit
Function        Measure-NaSnapshot
Function        Move-NaLun
Function        New-NaAggr
Function        New-NaFlexClone
Function        New-NaIGroup
Function        New-NaLun
Function        New-NaLunMap
Function        New-NaMirror
Function        New-NaPortSet
Function        New-NaSnapshot
Function        New-NaTPGroup
Function        New-NaVol
Function        Remove-NaAggr
Function        Remove-NaIGroup
Function        Remove-NaInitiator
Function        Remove-NaISCSIAuthentication
Function        Remove-Nalicense
Function        Remove-NaLun
Function        Remove-NaPort
Function        Remove-NaPortSet
Function        Remove-NaSnapshot
Function        Remove-NaSnapshotCheckPoint
Function        Remove-NaTPGroup
Function        Remove-NaTPGroupInterface
Function        Remove-NaVol
Function        Rename-NaAggr
Function        Rename-NaIGroup
Function        Rename-NaSnapshot
Function        Rename-NaVol
Function        Restore-NaSnapshot
Function        Resume-NaScrub
Function        Resume-NaVerify
Function        Set-NaAggr
Function        Set-NaAggrOptions
Function        Set-NaDate
Function        Set-NaDisk
Function        Set-NaIGroup
Function        Set-NaISCSIAlias
Function        Set-NaISCSIAuthentication
Function        Set-NaISCSIDefaultAuthentication
Function        Set-NaISCSINodeName
Function        Set-NaISNS
Function        Set-NaLun
Function        Set-NaLunSize
Function        Set-NaOption
Function        Set-NaSnapshotAutoDelete
Function        Set-NaSnapshotReserve
Function        Set-NaSnapshotSchedule
Function        Set-NaTimeZone
Function        Set-NaTPGroup
Function        Set-NaVol
Function        Set-NaVolAutoSize
Function        Set-NaVolCharmap
Function        Set-NaVolOptions
Function        Set-NaVolSize
Function        Split-NaFlexClone
Function        Split-NaMirror
Function        Start-NaClusterGiveback
Function        Start-NaClusterTakeover
Function        Start-NaDiskSwap
Function        Start-NaISCSIService
Function        Start-NaISNS
Function        Start-NaScrub
Function        Start-NaSnapshotCheckPoint
Function        Start-NaVerify
Function        Start-NaVolDecompress
Function        Start-NaZeroSpares
Function        Stop-NaDiskSwap
Function        Stop-NaFlexCloneSplit
Function        Stop-NaISCSIService
Function        Stop-NaISNS
Function        Stop-NaScrub
Function        Stop-NaSnapshotCheckPoint
Function        Stop-NaVerify
Function        Stop-NaVolDecompress
Function        Suspend-NaScrub
Function        Suspend-NaVerify
Function        Test-NaClusterNegotiatedFailover
Function        Test-NaLunPortSCSIReservations
Function        Test-NaSparesLow
Function        Update-NaDiskFirmware
Function        Update-NaISNS

9 thoughts on “Powershell: PoshOnTap meet world…”

  1. Nice work!! I know you’ve been at it a while and it’s great to see this and the ability to manage the NetApps via the command line.

    I’m not replicating this in perl…. 🙂

  2. Glenn, is there a problem with the PoshOnTap ZIP-file ?
    I keep getting corruption messages when I try to open it.

    Btw, any progress with the CIFS/NFS cmdlets ?
    Or are the “holes” unplugable ?

  3. @LucD I Don’t know what happened there I reposted the zip and It should work now.

    As for cifs/NFS I’m working on NFS now, maybe another week or so.

    ~Glenn

  4. The download works now.
    I can now download the 236Kb ZIP file, before I could only get 38Kb and got a corrupted ZIP file.
    Thanks.

  5. This looks real nice. I have been using the Powershell OnTAP from here:
    http://www.codeplex.com/PowerShellOnTAP

    He does have support for CIFS in there. However, his code is more of a passthrough to the filer than anything else.

    From the looks of your code, you are not affiliated at all. You code seems like it is more robust, so I’m definitely going to take a look.

    Thanks for the effort and for posting this!

    Is Powershell V2 a requirement for using this?

    • Yes V2 is a requirement because of the use of Powershell advanced functions.

      Yeah, that project got me started on my endeavor many moons ago. I would only add that you can still use the NaServer object returned by the New-NaServer cmdlet to perform those same raw ZAPI calls. If you already have “pass thru” code 🙂

      A quick look at the code contained in any of the included modules will show you how I’m doing it. The OnTap API is child’s play, even for an admin!

      Thanks for checking out the project, and please let me know of any issues you come across!

      ~Glenn

Leave a Reply