Subscribe

Discover serial numbers using a script.

Need some expert advice as I am new to NetApp. I'd like to be able to create some type of script that will go out and retrieve the serial numbers on all of my controllers and disk shelves for asset management purposes. Is this possible and if so what’s the best way to accomplish this? Any assistance would be greatly appreciated.

Re: Discover serial numbers using a script.

on the now.netapp.com, use the "my autosupport" filter with company name, it will populate all the serials, models and many more information.

cut and paste into the excel sheet - Easy to use.

Thank you,

AK G

Re: Discover serial numbers using a script.

or use the system manager which help you capture all the serials on the first screen itself. No need of a script please.

thank you,

AK G

Re: Discover serial numbers using a script.

Thanks for the suggestions however I'm looking for a little more. We would like to run a script once a month against all of our filers (We have many of them spread out all over the place) that will pull both the controller serial number AND the shelf serial numbers which would then export this information into a database.

Re: Discover serial numbers using a script.

use the powershell to write the scripts, it will get you what ever you are speaking but it will take at least 2 to 4 hours to script it.

thank you,


AK G

Re: Discover serial numbers using a script.

You gotta give us a little here. Do you have Powershell experience?  Do you know how to connect to filers via powershell?

Do you have ONtap powershell module installed? 

Re: Discover serial numbers using a script.

I do not have much powershell experience however I work with many who are experts. I've just downloaded the NetApp Powershell Toolkit and installed it on a Server 2008 R2 box. I've read through some tutorials and have successfully connected to one of my filers. This is pretty cool stuff!!  Is there a cheat sheet somewhere which would provide the different commands that can be used? For instance, let’s say I wanted to find the shelf serial number of the filer I just connected to, what command would I use for that?

Re: Discover serial numbers using a script.

Hi, Erick.  Try Get-NaHelp and Show-NaHelp.  Both can list Toolkit cmdlets by category, and the browser-based help includes the online help examples.  For example:

PS C:\> Get-NaHelp *shelf*

Name                                    Api                                     Category

----                                    ---                                     --------

Get-NaShelf                             {storage-shelf-list-info}               ses

Get-NaShelfEnvironment                  {storage-shelf-environment-list-info}   ses

Set-NaShelfLight                        {storage-shelf-set-led-state}           ses

Start-NaShelfUpdate                     {storage-shelf-update-fw}               ses

Re: Discover serial numbers using a script.

Thank all of you for your help so far, I have a very good understanding on how all of this works now. Time for one more question if it's not too much trouble. All of the commands listed above in Clinton's post do not return any shelf serial numbers. Does anyone know the command to get the acutal shelf serial number? Or am I just doing something wrong?

Re: Discover serial numbers using a script.

A shelf contains multiple replaceable pieces, several of which have serial numbers.  Try "Get-NaShelf | Get-NaShelfEnvironment | Format-Custom" and look through the results for something you can use.  There are multiple serial numbers reported, including some in the vendor-specific section (which can vary between shelf models).  So the data is there, but it's not as simple as getting a controller or disk serial number.  In some cases a shelf UID may suffice as a unique value; that's easy to get with Get-NaShelf.