cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
22331
Views
17
Helpful
37
Comments
joemar
Level 4
Level 4

I had a customer ask me for a way to easily collect all serial number from a UCS so they could give to their services team to make sure everything was covered under their SmartNet contract.  This is what I came up with.

This script allows you to log into a single or multiple UCS Domains and it will create an Excel spreadsheet of all the devices and their serial numbers.

Prerequisites:
  PowerShell v3 or greater enabled on your client machine
  Network access to your UCSM
  An account on your UCSM
  Excel installed on the client machine
  Cisco PowerTool for PowerShell installed in the client machine

Change Log:

     v0.5 - Initial posted version

     v0.5.01 - Added feature to exit script if you only provide a single domain and domain log in fails or if you are not logged into any UCSM.

     v0.5.02 - Added one more error check for login

     v0.5.03 - Found that older B230's that don't have DIMMs in a slot report their serial number as NO DIMM.  Look for that and ignore entering those into the inventory.

     v0.5.04 - Requires PowerShell V3 and now has a check to ensure you are running it or higher.

     v0.6 - Added a column with the associated Service Profile for the equipment where applicable.

     v0.7 - Added a column with the manufacturing date/time of the equipment where available.

     v0.8 - Added section to collect local hard disk info

     v0.9 - Added built in help.  Command line options.  Standard naming convention.

     v0.9.0.1 - Added support for saved credentials file

     v0.9.10 - Add fields with UCSM Licensing Information

As always, let me know if you have any questions, problems or suggestions.

Joe

Comments

Hi joemar is UCS Power tool the same as Cisco PowerTool for PowerShell?

and would there be a way to run this without Exel? our admin VM does not include it.

Thanks.

Stephane

I Joemar,

I ran the script and its seems to run perfectly but... there is nothing else then the colmun title in the xls spreedsheet.

I am running Excel 2003 in my VM would that be the issue?  Thanks

joemar
Level 4
Level 4

Yes, it is the UCS PowerTool for PowerShell

joemar
Level 4
Level 4

Hmmm....must be as I am using Excel 2013.  Might be a PowerShell limitation in that version.

joemar
Level 4
Level 4

I take that back.  The way I write the data isn't different than any other fields.

joemar
Level 4
Level 4

Is it just the column headers that are missing?  But you are getting all the data?

Mhm ok let me try with excel 2010 should work seen other issues with 2003 in the past and PS.

I’ll get back to you.

Stephane Beausoleil

SysAdmin senior / Équipe Virtualisation

Tel: (514) 415-3000 x1015694

Cel: (514) 233-1828

Stephane.beausoleil@cgi.com<mailto:denis.chevalier@cgi.com>

1350, boul. René-Lévesque Ouest

Montréal (Québec), H3G 1T4

Téléphone (514) 415-3000

www.cgi.com<http://www.cgi.com/>

AVIS DE CONFIDENTIALITÉ : Ce message peut contenir des renseignements confidentiels appartenant exclusivement au Groupe CGI Inc. ou à ses filiales. Si vous n'êtes pas le destinataire indiqué ou prévu dans ce message (ou responsable de livrer ce message à la personne indiquée ou prévue) ou si vous pensez que ce message vous a été adressé par erreur, vous ne pouvez pas utiliser ou reproduire ce message, ni le livrer à quelqu'un d'autre. Dans ce cas, vous devez le détruire et vous êtes prié d'avertir l'expéditeur en répondant au courriel.

No it’s the data that is not there. The headers are all ok.

Stephane Beausoleil

SysAdmin senior / Équipe Virtualisation

Tel: (514) 415-3000 x1015694

Cel: (514) 233-1828

Stephane.beausoleil@cgi.com<mailto:denis.chevalier@cgi.com>

1350, boul. René-Lévesque Ouest

Montréal (Québec), H3G 1T4

Téléphone (514) 415-3000

www.cgi.com<http://www.cgi.com/>

AVIS DE CONFIDENTIALITÉ : Ce message peut contenir des renseignements confidentiels appartenant exclusivement au Groupe CGI Inc. ou à ses filiales. Si vous n'êtes pas le destinataire indiqué ou prévu dans ce message (ou responsable de livrer ce message à la personne indiquée ou prévue) ou si vous pensez que ce message vous a été adressé par erreur, vous ne pouvez pas utiliser ou reproduire ce message, ni le livrer à quelqu'un d'autre. Dans ce cas, vous devez le détruire et vous êtes prié d'avertir l'expéditeur en répondant au courriel.

joemar
Level 4
Level 4

If you would like, we can do a webex at a time that works to see the script run and for me to look at some of the collected values to see if I can figure out where the issue lies.  Let me know if you'd be willing to do that and I'll send you an invite.

That would be great thanks

Tomorrow morning I should have time early at your convenience.

Thanks

Stephane Beausoleil

SysAdmin senior / Équipe Virtualisation

Tel: (514) 415-3000 x1015694

Cel: (514) 233-1828

Stephane.beausoleil@cgi.com<mailto:denis.chevalier@cgi.com>

1350, boul. René-Lévesque Ouest

Montréal (Québec), H3G 1T4

Téléphone (514) 415-3000

www.cgi.com<http://www.cgi.com/>

AVIS DE CONFIDENTIALITÉ : Ce message peut contenir des renseignements confidentiels appartenant exclusivement au Groupe CGI Inc. ou à ses filiales. Si vous n'êtes pas le destinataire indiqué ou prévu dans ce message (ou responsable de livrer ce message à la personne indiquée ou prévue) ou si vous pensez que ce message vous a été adressé par erreur, vous ne pouvez pas utiliser ou reproduire ce message, ni le livrer à quelqu'un d'autre. Dans ce cas, vous devez le détruire et vous êtes prié d'avertir l'expéditeur en répondant au courriel.

joemar
Level 4
Level 4

I also just updated the script with some error checking for failed logins.  Try using it and see if that could be part of the problem.

Are you using native local login for your UCSM or are you using AD or TACACSs.  This script is set to only use local login and generally uses the admin account.

Ok let’s try this

Stephane Beausoleil

SysAdmin senior / Équipe Virtualisation

Tel: (514) 415-3000 x1015694

Cel: (514) 233-1828

Stephane.beausoleil@cgi.com<mailto:denis.chevalier@cgi.com>

1350, boul. René-Lévesque Ouest

Montréal (Québec), H3G 1T4

Téléphone (514) 415-3000

www.cgi.com<http://www.cgi.com/>

AVIS DE CONFIDENTIALITÉ : Ce message peut contenir des renseignements confidentiels appartenant exclusivement au Groupe CGI Inc. ou à ses filiales. Si vous n'êtes pas le destinataire indiqué ou prévu dans ce message (ou responsable de livrer ce message à la personne indiquée ou prévue) ou si vous pensez que ce message vous a été adressé par erreur, vous ne pouvez pas utiliser ou reproduire ce message, ni le livrer à quelqu'un d'autre. Dans ce cas, vous devez le détruire et vous êtes prié d'avertir l'expéditeur en répondant au courriel.

nope same result, id does retreive the UCS name (i put the ip in the login request) and no change if i put the IP or the unc name.

very strange but at the speed it runs i pretty sure its not doing any data collections.

Thanks

joemar
Level 4
Level 4

OK, sorry you are having this trouble.  I have had a few people test the script themselves and it's working for them so again, if you are interested we can do a Webex to examine this issue.  I am on the West coast and will be in the office tomorrow starting at 8am pacific.  Let me know!

I am in!

Stephane Beausoleil

SysAdmin senior / Équipe Virtualisation

Tel: (514) 415-3000 x1015694

Cel: (514) 233-1828

Stephane.beausoleil@cgi.com<mailto:denis.chevalier@cgi.com>

1350, boul. René-Lévesque Ouest

Montréal (Québec), H3G 1T4

Téléphone (514) 415-3000

www.cgi.com<http://www.cgi.com/>

AVIS DE CONFIDENTIALITÉ : Ce message peut contenir des renseignements confidentiels appartenant exclusivement au Groupe CGI Inc. ou à ses filiales. Si vous n'êtes pas le destinataire indiqué ou prévu dans ce message (ou responsable de livrer ce message à la personne indiquée ou prévue) ou si vous pensez que ce message vous a été adressé par erreur, vous ne pouvez pas utiliser ou reproduire ce message, ni le livrer à quelqu'un d'autre. Dans ce cas, vous devez le détruire et vous êtes prié d'avertir l'expéditeur en répondant au courriel.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links