- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Remote Server Management
- >
- Re: RILOE - CPQLOCFG - Set DNS_NAME to Server name...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2005 02:43 PM
тАО04-11-2005 02:43 PM
So in affect I need to ask the RILOE what is the Server's Name and store that in a variable. Then when I get to this section of the XML script:
I need to say something like (servername being the variable holding the server name):
Any help would be appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2005 07:55 AM
тАО04-12-2005 07:55 AM
Re: RILOE - CPQLOCFG - Set DNS_NAME to Server name + "-RA" (i.e. server-ra)
You will have to look toward other scripting utilities like perl.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 02:05 PM
тАО04-18-2005 02:05 PM
Re: RILOE - CPQLOCFG - Set DNS_NAME to Server name + "-RA" (i.e. server-ra)
I have written a script which will write out the xml file with the host name and then execute the cpqlocfg.
This is grabbed from a txt file of all of the servers you want to modify.
Are you interested?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 04:56 PM
тАО04-18-2005 04:56 PM
Re: RILOE - CPQLOCFG - Set DNS_NAME to Server name + "-RA" (i.e. server-ra)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2005 04:11 PM
тАО04-20-2005 04:11 PM
Re: RILOE - CPQLOCFG - Set DNS_NAME to Server name + "-RA" (i.e. server-ra)
Did you want the ILO script to work out the host name of the server? I have not done this..... I am not sure this is possible with the rib commands that I am familiar with.
If you have a CSV file that had on each line
oldribname,newribname
My script with slight modification can help you...... and hit hundreds and thousands...
my ema1l is david dot graham at austrade dot gov dot au (spammers) lets talk more.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-21-2005 06:28 PM
тАО04-21-2005 06:28 PM
Solutionhere is the munging of 2 scripts that I had that allow the renaming of the rib is you already know its name or IP
'
' Riloes.ini must be formatted %nameoripofriloe%,%newdnsnameofriloe% must be separted by comma
'
On error resume next
Set Filesys = CreateObject("Scripting.FileSystemObject")
Set WshShell = CreateObject("Wscript.Shell")
Set WshNetwork = CreateObject("Wscript.Network")
ScriptPath = Left(wscript.ScriptFullName,instrrev(wscript.ScriptFullName,"\"))
'Input file
Infile = "RILOES.ini"
'Logfile
Logfile = "RILOE.xml"
'XML Input
RILOCMD = "insert.xml"
'Output File
Summary = "RILOES.LOG"
strRILOEUser = "insertusernamehere"
strRILOEPW = "replacewithrealpassword"
'Open Log File
Set Writefile = Filesys.CreateTextFile(Summary)
'Open the file
Set Readfile = Filesys.OpenTextFile(Infile, 1, false)
'Get a line from the input file, ignoring semi-colon
Do while Readfile.AtEndOfStream = False
MyString = Readfile.ReadLine
MyArray = split(MyString, "," , -1, 1)
RILOEName = MyArray (0)
NewName = MyArray (1)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWshShell = CreateObject("Wscript.Shell")
'Create Empty XML File
Set XMLWrite = objFSO.CreateTextFile(RILOCMD)
'Create XML File
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
'If not comment, then execute configurator - logging to temp file
wshShell.Run "cpqlocfg.exe -s " & RILOEName & " -l " & Logfile & " -f " & RILOCMD,1,1
'Open & Read Temp File
Set Tempfile = Filesys.OpenTextFile(Logfile, 1, false)
TempText= TempFile.Readall
if Instr(TempText,Scriptpath & "cpqlocfg.exe: Script succeeded on " & chr(34) & RILOENAME & ":443" & chr(34))>=1 Then
Writefile.Write RILOENAME & " Configured correctly." & vbcrlf
else
Writefile.Write RILOENAME & " configuration FAILED!" & vbcrlf
end if
'Close & Delete the temp file
TempFile.close
Filesys.deletefile(Logfile)
'Delete XML file to allow the Next one
XMLWrite.close
Filesys.deletefile(RILOCMD)
Loop
Readfile.close
Writefile.close
msgbox("Script Complete. Log files are located at " & scriptpath)
Wscript.quit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2005 06:05 PM
тАО05-02-2005 06:05 PM
Re: RILOE - CPQLOCFG - Set DNS_NAME to Server name + "-RA" (i.e. server-ra)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2008 11:43 AM
тАО02-15-2008 11:43 AM
Re: RILOE - CPQLOCFG - Set DNS_NAME to Server name + "-RA" (i.e. server-ra)
so here's what I have for a batch file so far (works great)
Inside the xml files I have the userid and %variable% for each one..
set server=%computername%
set iloname=%server%LO
hponcfg /f dns.xml /s iloname=%iloname%
hponcfg /f snmp.xml /s server=%server%
DEL *.XML
Now when I try to do this with vbscript here's what I have - I'm not a vbscript guy...
' read computername
DIM computername
DIM leftcomputername
DIM rightcomputername
DIM ilovariable
DIM finalname
'temp variable for hponline config iloname is in the xml flie
iloname = ("%iloname%")
server1= ("%server%")
'get the computername
Set WshNetwork = WScript.CreateObject("WScript.Network")
'WScript.Echo "Your Computer Name is = " & WshNetwork.ComputerName
'set the comptuername variable
COMPUTERNAME = WshNetwork.ComputerName
SERVER = WshNetwork.ComputerName
'set the ilo name that will be inserted
ilovariable = ("LO")
'WScript.Echo ilovariable
'make sure there's no spaces in the name
computername = Trim(computername)
'get the length of the computername
Count = Len(computername)
'WScript.Echo count
'WScript.Echo computername
count = count-2
'WScript.Echo count
'left trim string
leftcomputername = Left(computername,count)
'WScript.Echo leftcomputername
'WScript.echo UCase("leftcomputername")
'trim the right string and assign it to a variable
rightcomputername = Right(COMPUTERNAME,2)
'WScript.Echo rightcomputername
'WScript.echo UCase("rightcomputername")
finalname = leftcomputername
finalname = finalname & ilovariable
finalname = finalname & rightcomputername
WScript.Echo "Your Ilo Name would be = " & finalname
'time to execute hp online config utility
'Executes HPONCFG.exe in order to gather iLO config
Set objShell = CreateObject("Wscript.Shell")
'backup existing ilo config
'ObjShell.Run("%comspec% /c hponcfg /w %computername%.xml /l >%computername%iloconfig.log"), 1, True
'add the admin user
'only used on new builds
'ObjShell.Run("%comspec% /c hponcfg /f add_user.xml /l >>%computername%iloconfig.log"), 1, True
'write the ilo dns_name variable which sets the ilo name
WScript.Echo finalname
'ObjShell.Run("%comspec% /c hponcfg /f dns.xml /s server=%iloname% /l >>%computername%iloconfig.log"), 1, True
Evertything works great untill I try to shell out to run hponcfg /s...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2008 12:12 PM
тАО02-16-2008 12:12 PM
Re: RILOE - CPQLOCFG - Set DNS_NAME to Server name + "-RA" (i.e. server-ra)
- generate the add_user.xml
- generate the Mod_Network_Settings.xml
- generate the Mod_SNMP_IM_Settings.xml
- generate the Import_Cert.xml
- generate the Mod_Directory.xml
You can customize the ilo name to whatever standard you want
- all things are variables so that you can change what you need and then generate the scripts dynamically.
I haven't ever played with reading a file but am working on a way to generate the certificate based upon an excel file/microsoft access database
I'm attaching the text file - rename to vbs
' read computername
DIM computername
DIM leftcomputername
DIM rightcomputername
DIM ilovariable
DIM finalname
'set the ilo username and password
strRILOEUser = "adminusername"
strRILOEPW = "adminpassword"
'set the settings for the network xml file
stripaddress = "192.168.1.1"
strsubnetmask = "255.255.255.0"
strgatewayip = "192.168.1.1"
strdomainname = "domainname.com"
strdhcpgateway = "192.168.1.1"
strdhcpdnsserver = "192.168.1.1"
strdhcpwinsserver = "192.168.1.1"
strdhcpstaticroute = "192.168.1.1"
strregwinsserver = "192.168.1.1"
strpridnsserver = "192.168.1.1"
strsecdnsserver = "192.168.1.1"
strterdnsserver = "192.168.1.1"
strpriwinsserver = "192.168.1.1"
strsecwinsserver = "192.168.1.1"
strstaticroute1 = "0.0.0.0"
strstaticroute2 = "0.0.0.0"
strstaticroute3 = "0.0.0.0"
strenclosureipenable = "YES"
strwebagentipaddress = "192.168.1.1"
'set the variable for snmp
strsnmpaddress1 = "192.168.1.1"
strsnmpaddress2 = "192.168.1.1"
strsnmpaddress3 = "192.168.1.1"
strostraps ="Y"
strsnmppass ="Y"
strribtraps ="Y"
strCIMSECURITYMASK ="3"
'set the variables for adding a user
'username to add
straddusername ="someuser"
'username to add's password
struserlogin ="someuser"
'usernames new password
strnewuserpassword ="somepassword"
stradminpriv = "Y"
strremoteconsolepriv = "Y"
strresetserverpriv = "Y"
strvirtualmediapriv = "Y"
sterconfigilopriv = "Y"
strconfigrilopriv = "Y"
strloginpriv = "Y"
'the settings for this are range and subnetmask
strclientrange = "10.10.10.1 - 254.255.255.255"
strviewlogspriv = "YES"
strclearlogspriv = "YES"
stremsprive = "YES"
strupdateilopriv = "YES"
strconfgirackpriv = "YES"
strdiagpriv = "YES"
'set the variables for generating certificate xml file
'set the variables for directory configuration xml files
'format for this is yes or no
stdirauthenabled ="YES"
strdirlocaluseracct ="YES"
strdirserveraddress ="192.168.1.1"
strdirserverportvalue ="636"
'format for the strdirobjectdn variable is like this CN=server1_rib, OU=RIB, DC=HPRIB, DC=LABS
strdirobjectdn = "CN=server1_rib, OU=RIB, DC=HPRIB, DC=LABS"
strdirobjectpassword = "password"
'format for the strdirusercontext is like this CN=Users, DC=HPRIB, DC=LABS
strdirusercontext1 ="CN=Users, DC=HPRIB, DC=LABS"
'format for this is yes or no
strdirenablegrpacct ="YES"
'get the computername
Set WshNetwork=WScript.CreateObject("WScript.Network")
'WScript.Echo "Your Computer Name is = " & WshNetwork.ComputerName
'set the comptuername variable
COMPUTERNAME=WshNetwork.ComputerName
'WScript.Echo computername
'set the ilo name that will be inserted
ilovariable=("LO")
'WScript.Echo ilovariable
'make sure there's no spaces in the name
computername = Trim(computername)
'get the length of the computername
Count=Len(computername)
'WScript.Echo count
'WScript.Echo computername
count=count-2
'WScript.Echo count
'left trim string
leftcomputername=Left(computername,count)
'WScript.Echo leftcomputername
'trim the right string and assign it to a variable
rightcomputername = Right(COMPUTERNAME,2)
'WScript.Echo rightcomputername
finalname=leftcomputername
finalname=finalname & ilovariable
finalname=finalname & rightcomputername
'WScript.Echo "Your Ilo Name would be = " & finalname
'time to execute hp online config utility
'Executes HPONCFG.exe in order to gather iLO config
'Generate the xml file sample
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWshShell = CreateObject("Wscript.Shell")
'Create Empty XML File
Set XMLWrite = objFSO.CreateTextFile("Mod_Network_Settings.xml")
'Create XML Files
'generate the ilo name xml
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
'XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
'generate the snmp xml configuration file
Set XMLWrite = objFSO.CreateTextFile("Mod_SNMP_IM_Settings.xml")
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
'generate the add_user.xml
Set XMLWrite = objFSO.CreateTextFile("add_user.xml")
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write " USER_LOGIN=" & struserlogin & Chr(34) & "/>" & vbcrlf
XMLWrite.Write " PASSWORD=" & strnewuserpassword & Chr(34) & "/>" & vbcrlf
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
'xml generator for certificates import
Set XMLWrite = objFSO.CreateTextFile("Import_Cert.xml")
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write " -----BEGIN CERTIFICATE-----" & vbcrlf
XMLWrite.Write " insert certificate here-----" & vbcrlf
XMLWrite.Write " -----END CERTIFICATE-------" & vbcrlf
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
'directory xml generator for setup of directory
Set XMLWrite = objFSO.CreateTextFile("Mod_Directory.xml")
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "
XMLWrite.Write "