Highlighted
Absent Member.
Absent Member.
1002 views

Terminal Server - Device Menu Hostname Change (Script)

Hello all!

I am currently an intern learning how to use the HP NA system and would like to find out a specific task without asking any of the engineers I work with without trying to figure it out on my own first.

My question is how do I go about setting up a script that would run and change Terminal Server Device hostnames?

For e.x:

Terminal Server-001: (has these switched connected to it)

  • SW-001
  • SW-005
  • SW-006
  • SW-004


In theory I would want to change hostname of SW-005, SW-006 to --> SW-002 & SW-003 w/ running some type of script.

Now I have to do this to a lot more than 2 devices, so keep that in mind.

Thanks in advance for any help!

0 Likes
4 Replies
Highlighted
Frequent Contributor.. Frequent Contributor..
Frequent Contributor..

Re: Terminal Server - Device Menu Hostname Change (Script)

Hello,

 

Normally we do not support command scripts but let me investigate a little bit to see how I can guide you with you concern.

 

I'll keep you posted.

 

Regards,

 

Fabian Corella T.
SW Premier Support Technical Consultant
HP Network Automation Certified Engineer
TSIA Certified Support Professional

The views and opinions expressed in my contributions are my own and do not necessarily reflect the views and strategy of HP

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Terminal Server - Device Menu Hostname Change (Script)

Thank you for atleast checking this out for me! Appreciate it! I just need a referance, on how to accomplish what I'm asking for!

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Terminal Server - Device Menu Hostname Change (Script)

I'm not sure how much help this will be, but may get you started....

 

If you know how to make this change manually, I have an option that will at least get you part of the way (with a script).

 

From NA, you can connect to the terminal server (using the NA proxy).

 

Once you connect to the device, make your change manually.  When you are done, just exit the session and return to NA.

 

Then you can go to the device's page (if you aren't already there), then View -> Telnet/SSH Sessions.

 

Click on View Commands Only for the session you just created.

 

You'll see two links in the right-hand corner - Convert to Expect Script, Convert to Perl Script.  Pick either (depending on what you know and what you have available on your NA host).

 

This will get you a script that should run.  However, you'll need to change a few things in it - change the hard-coded bits (what you are changing) to variables (scriptField1, scriptField2, etc), so you can use a task CSV template. 

 

Sorry but I know really nothing about term servers - haven't worked with them in a long, long time. 

 

Hope this helps,

 

Chris

 

 

0 Likes
Highlighted
Frequent Contributor.. Frequent Contributor..
Frequent Contributor..

Re: Terminal Server - Device Menu Hostname Change (Script)

Hi Chris,

 

How are you? It's been awhile. Good to see you again on the HPNA world 🙂

 

My two cents and to reinforce what Chris is seeing (it is a very good option by the way). Please see the attached doc file with some steps you could follow to create the command script you are looking for to modify the hostname of your devices via HPNA.

 

I hope it helps,

 

Cheers,

 

Fabian Corella T.
SW Premier Support Technical Consultant
HP Network Automation Certified Engineer
TSIA Certified Support Professional

The views and opinions expressed in my contributions are my own and do not necessarily reflect the views and strategy of HP

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.