EMC Isilon Platform API and PowerShell Part II

In my last post I talked about the Isilon REST based platform API. I have been experimenting more with the Isilon API and PowerShell. I thought I would share the progress so far.

I decided to create a PowerShell module to leverage the functionality exposed by the Isilon platform API. The module provides some advanced functions, script cmdlets if you prefer, to provide API access. Right now I have some ‘get’ cmdlets and a lot of work to do before I have full coverage of the API. Maybe I can catch up by the time there is full coverage of the Isilon functionality in the platform APIJ

The module uses basic authentication at this time as I am still working on other authentication options. The first step in using the module is to download it and place it in your modules directory. Then load the module and create a password file for logging on to the Isilon cluster. The New-PasswordFile command creates an encrypted file containing the supplied password. This file is used to supply authentication automatically. The file can only be used by the user who was logged on when the file was created.

Once this is complete the following code will load a console with the cmdlets and setup authentication.

This code uses the password file we created earlier. Once it is executed we see the available Isilon cmdlets and we have a console to execute Isilon commands and scripts. I put this code into a script to launch an Isilon management console.

Now that we have a console with the commands loaded we can use them to get information from the Isilon system. Here is an example of a command to return all Isilon groups.

Here we can see all groups are returned with all properties. We also see the results are returned as PowerShell objects. This gives us all of the PowerShell goodness when working with the Isilon platform API. The next example uses PowerShell to display just the information we want in an easier to read format.

The following example shows how we can query the groups, filter by type and control the display format. This example retrieves all users with the domain type of BUILTIN and displays the name and provider in a results table.

The cmdlets will also allow using the pipeline. Although, I do not have pipline functionality in all cmdlets yet. The user, group and provider cmdlets do. The following example shows a listing of all Isilon ADS BUILTIN groups and the members of each group.

Hopefully someone finds this interesting and I will try to provide more useful examples as I add functionality to the module. Here are the download links for the module and the console launch script. You will need to modify the console launch script(Start-IsilonPlatform.ps1) for your environment.

IsilonPlatform
Start-IsilonPlatform

This module is a work in progress so use at your own risk. I hope to provide more functionality soon and I hope to see EMC add more coverage to the API. I would really like to see more around cluster configuration and performance statistics. I think this is great functionality provided by EMC, more please!

Feedback on the module is welcome.

Regards,

Dave

Leave a Reply

Your email address will not be published. Required fields are marked *

6 comments

  1. bc says:

    Dave,
    This is some great information. One thing I am trying to do is to create a folder, and then a share on our Isilon Cluster using Powershell. Have you had any experience using the RestAPI to do anything like that, or is there a better approach when using powershell?

    thanks, B

  2. dmuegge says:

    BC,

    The functionality you need does exist in the Rest API. You would not need the API for the folder creation since is is simply SMB you can just use new-item. The share would then be created via the Rest API using the POST method of the ‘/platform/1/protocols/smb/shares’ URI. It is on my list to add ‘New’ and ‘Set’ functions to the module, but I am not there yet. Also, the PUT and POST method are a little more involved due to the use of JSON.

    The best documentation for help with this is the Isilon Platform API reference. This document should be available to anyone with a valid account on the Powerlink/EMC support site. The SMB shares resource is the applicable section of the document.

    I hope this helps get you started. Please come back and share any progress.

    Regards,

    Dave

  3. Pi3rce says:

    Awesome, thank you.

    I’ve been working on some nice scripts to find access for users/groups on our Isilon shares and I end up bouncing between the Isilon server and the windows servers a lot.

    Now with this module I’m able to grab most of the information I need/want right from the same ps script. Well done.

  4. David,

    Great stuff, just got access to our Isilon’s API, ready to play! Noticed you mentioned it was a work in progress – any updates, or are you still using it as is?

    Thanks!

    rcm

  5. anil says:

    Hello Dave,
    It was great post…
    Could please provide me a script to shutdown isilon using windows powercli.

    Thanks in advance..
    Regards
    Anil

    • dmuegge says:

      Anil,

      Thanks for the comment. I do not have a lot of free time these days, but I will put this request on the list to create a script and write a post. You should easily be able to use the Isilon Platform API reference and the concepts in my previous posts to put something together if I don’t get to it quick enough.

      Regards,

      Dave