cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2500
Views
5
Helpful
1
Comments
joemar
Level 4
Level 4

This UCS PowerShell script allows to to connect to a UCS domain and then specify the name or IP address of a server and have all the NICs on the server renamed to match the names in the UCS vNIC Template.

This script requires WMI access to the Windows machine and admin level login rights to the server.

The benefit of this is that you can quickly identify NICs to assign functions such as Hyper-V vSwitches, Clustering, Live Migrations, etc.

It only takes a few seconds for it to make the changes.

Change Log:

     v0.6 - Initial Posted Version

     v0.8 - New look and feel.  Common scripting elements.  Tests that you are running at least PowerShell v3

     v0.8.01 - Fixed issue where script would exit if Hyper-V was not enabled

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

     v0.8.03 - Added support for saved credentials files for both UCSM and the server to be NIC renamed

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


Joe

Comments
tcerling
Level 4
Level 4

Though there is still value in having this capability, Cisco now supports Consistent Device Naming.  This enables automatically setting the name of a NIC equal to a string defined in a vNIC Template.  There are two options - vNIC Name or User Defined.  I will use the vNIC Name option to get the same effect as this script.  The below image shows a vNIC template that sets the vNIC Name option.  When a system defined with a Service Profile using this vNIC template boots a Windows Server 2012 or later instance, the name of the NIC will appear as LiveMigration with the Windows operating system.

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