Start a Conversation

Unsolved

This post is more than 5 years old

3874

June 2nd, 2016 07:00

remote task: can we put many lines in one single remote task

Hi, I use OME remote command line task (racadm) to perform tasks on nodes. I want to know if i could create a task with two or more lines in it. Say I want to configure 2 DNS servers on idracs, instead of creating one task with line:

racadm config -g cfgLanNetworking -o cfgDNSServer1=1.2.3.4

and then a second task with line:

racadm config -g cfgLanNetworking -o cfgDNSServer2=5.6.7.8

I wanted to know if there is a way (maybe with semi-column or something) to combine both those tasks into 1.

Another case where i would need this is when adding a new admin user using command line (racadm) task, i need to run 4 commands... 1 for creation, 1 for setting password, 1 for privileges and then finaly 1 to enable.... or can this all be combined into one task?

Many thanks in advance,

Naseem

June 2nd, 2016 07:00

Hey Naseem,

A while ago i received a script from Martijn Groothuis of Dell (great guy).

I've adjusted it a bit but did not have the time to test them.

Perhaps they will be of some use to you. in the rar file there are two seperate scripts burt basicly the same principal.

Hope this helps.

greetz Peter

1 Attachment

33 Posts

June 2nd, 2016 08:00

I edit the first few lines with the values i want right? replaceding the %1 with an actual ip?

I get the incorrect number of lines message....


Also, can this script be run on a range of ips?

33 Posts

June 2nd, 2016 08:00

Thanks for the reply Peter. Interesting, would you be so kind as to provide a step by step procedure as to how you run one of these scripts?

June 3rd, 2016 01:00

This is the original script that Peter was talking about including the whitepaper to set it up.

1 Attachment

June 3rd, 2016 03:00

Hey Nazeem,

Sorry for the late reply, i was working on a script to create users from the remote task.

No you don't need to replace the %1 with an actual IP this will be filled in along the way when you choose your servers where the script will be ran.

i've finished the script for Creating users. it's for 12the generation servers and further. when you want one for 11the generation let me know.

i also added a small script to delete a user. That can be handy when make a type or something like that and a describtion.

both scripts are *** from Martijn's original by the way. :-)

let me know how it goes Okay?

greetz Peter.

1 Attachment

33 Posts

June 3rd, 2016 07:00

Thank you both very much! I will try ASAP and get back to you with results.

33 Posts

June 3rd, 2016 08:00

Hi Peter,  for set-dns I still get the incorrect number of command line arguments

after setting 

IF "%argC%" NEQ "6" GOTO ERROR_MESSAGE

 Any idea why?

Thanks,

Naseem

June 3rd, 2016 08:00

Hi Naseem,

Which script are you referring to, the one from Peter or mine?

33 Posts

June 3rd, 2016 08:00

By the way that error is when i double clic the script. When i try to run it via OME onto a select  node, i get an invalid script credentials error. (I am using idrac admin user and pass)

33 Posts

June 3rd, 2016 08:00

Hi Martin, this is happening for both scrips. your original SNMP as well as set-DNS provided by Peter. I must be doing something wrong

June 3rd, 2016 09:00

Hi Naseem,

If you use my script and follow the whitepaper it should work as desired. The script is not designed to be run directly without any parameters that will give an error.

33 Posts

June 3rd, 2016 09:00

Hi Martin and Peter, I had trouble due to silly mistakes and my lack of experience with scripting:

1) i was setting the location of script wrong (OME resides on remote VM, i  was storing scripts on local drive, but pointing to  drive of the OME VM) so that was corrected

2) i did not understand the second set of credentials it asks for, those are not the idrac credentials but the OME credentials

3)script is not meant to be double clicked, meant to be run through OME with arguements

4)first 3 arguements (racip, racuser racpassword) are accounted for as you enter this info via OME, all other arguments need to be entered manually after

OK so it worked!! This has opened a new dimension of super powers, i just need to figure out the syntax to make my own.... what language are these scrpts in may i ask?

PS Peter, slight error in the dns script you may want to correct! probably stemmed from my bad syntax of racadm in my original post but:

remove the "=" signs and replace with a space for the following:

cfgDNSServer1=%DNSIP1%

and

cfgDNSServer2=%DNSIP2%

Many thanks to you both, is there a repo with sample scripts?

Best,

Naseem

June 5th, 2016 23:00

Hello Nazeem,

thx for the reply, i'm glad it worked for you. i will correct te error in my script. As far as i kknow the script is just written in powercli.

Goodluck.

greetz Peter

June 6th, 2016 01:00

It is just a Windows Batch script.

No Events found!

Top