ProLiant Servers (ML,DL,SL)
1745923 Members
4408 Online
108723 Solutions
New Discussion

Using Powershell for ILO to set ILO IPv6 Parameters?

 
Saunders
Occasional Advisor

Using Powershell for ILO to set ILO IPv6 Parameters?

Hello All, 

 

I am currently using the HP Scripting Tools for Windows Powershell to configure ILO3 interfaces on my servers. The cmdlets work great and they have greatly helped me out on a day-to-day basis. 

 

I am running into a little difficulty using the PowerShell cmdlets to configure the IPv6 parameters of the ILO and cant seem to locate the correct command or example to modify any of the IPv6 settings. 

 

For example, I can use the command: Set-HPiLONetworkSetting to disable IPv4 DHCP settings, but I cant figure out how to disable IPv6 DHCP settings. 

 

The user guide references the ability to submit both IPv4 and IPv6 parameters on the same command, but I cant seem to specificly figure out to change parameters that are on/off or yes/no variables. 

 

My goal is to set the IPv4_sntp1 and IPv4_sntp2 parameters, however the ILO3 wont let you set those parameters until you disable both ipv4_dhcp_sntp (set it to no) and disable ipv6_dhcp_sntp (set it to no)

 

Can anybody post an example of the command to modify ipv6 parameters?

 

Thanks!

7 REPLIES 7
Saunders
Occasional Advisor

Re: Using Powershell for ILO to set ILO IPv6 Parameters?

 

Here is an example of code:

 

> get-HPiLONetworkSetting -Server $servername -username $username -password $password

 

Results:

IP                               : 192.168.1.1
HOSTNAME                         : hostname
STATUS_TYPE                      : OK
STATUS_MESSAGE                   : OK
DHCPV6_DNS_SERVER                : Y
DHCPV6_RAPID_COMMIT              : N
DHCPV6_SNTP_SETTINGS             : Y
DHCPV6_STATEFUL_ENABLE           : Y
DHCPV6_STATELESS_ENABLE          : Y
DHCP_DNS_SERVER                  : N
DHCP_DOMAIN_NAME                 : N
DHCP_ENABLE                      : N
DHCP_GATEWAY                     : N
DHCP_SNTP_SETTINGS               : N
DHCP_STATIC_ROUTE                : N

 

So, my question is, how do you use Powershell to change the setting to N?

 

Saunders

 

 

andrew_savill
Visitor

Re: Using Powershell for ILO to set ILO IPv6 Parameters?

Did you find a solution to this?  I am also looking at how to modify the IPv6 settings.

Saunders
Occasional Advisor

Re: Using Powershell for ILO to set ILO IPv6 Parameters?

Sorry, I havent been able to figure it out. 

 

The only idea I have at the moment is to combine the traditional HP ILO scripting tool kit and disable all the IPv6 settings with a one time shot. Then, come back with powershell and set all the ipv4 parameters. 

 

Any response from HP??

 

Saunders

andrew_savill
Visitor

Re: Using Powershell for ILO to set ILO IPv6 Parameters?

OK so I think I got it and it was you last message that gave me the idea.

 

The overview is that all the iLo Powershell  library does is communicate to the iLos in correctly formatted RIBCL just like the STK.

 

The reason why you can’t set the IPv6 settings is that in the current version of the module they simply have not been added yet.

 

My fix was to create a separate function called Set-HPiLOIPv6NetworkSetting based off of Set-HPiLONetworkSetting in the HPiLOCmdlets file and add the needed Params and supporting code.

 

I went through and looked at a Param that took the same input as the ones I need (Y/N) like DHCPEnable and made sure I copied the relevant sections over.  I think there are only four places I copied and amended.

 

I then made sure the new function is exported in the module.

 

Hope this helps,

 

Kind Regards,

 

Andrew

Saunders
Occasional Advisor

Re: Using Powershell for ILO to set ILO IPv6 Parameters?

Hi Andrew, that sounds like a workable solution. if you dont mind, can you share the code and which files you modified? I would certainly appreciate it and maybe the HP guys can adopt the code in the next release. 

 

Thanks for figuring it out!

 

Saunders

migeaux
Occasional Visitor

Re: Using Powershell for ILO to set ILO IPv6 Parameters?

Hi Andrew.

 

I'll also be interrested by your IPv6 Customized cmdlets

 

Could you let me know how to get it, pls ?

 

Thanks

 

Yann

 

 

speedlyg
Occasional Contributor

Re: Using Powershell for ILO to set ILO IPv6 Parameters?

Hi Yann,

 

If you installed the HPILOCmdlets with version 1.1

it's not support the network ipv6 settings.

 

Now we are developing the a new cmdlets named set-hpiloipv6networksetting in verison 1.2

And it will be released at 2014/12