Server Management - Remote Server Management
1751937 Members
4955 Online
108783 Solutions
New Discussion

Re: HPEILO Cmdlets Set-HPEILOIpv4NetworkSetting failing with CSV input

 
rookie1082
Frequent Advisor

HPEILO Cmdlets Set-HPEILOIpv4NetworkSetting failing with CSV input

Hello,

I have a csv with 4 headers... IP, Username, Password, DNSName

I am using this CSV file to try to set the DNS name on many servers with the following code:

$c = $csv | connect-hpeilo -disablecertificateauthentication -warningaction -silently continue
$c | Set-HPEiLOIPv4NetworkSetting -InterfaceType Dedicated

This will fail with the following error:

et-HPEiLOIPv4NetworkSetting : Provide a value to be set along with the 'InterfaceType' parameter.
At line:1 char:11
+ $c | Set-HPEiLOIPv4NetworkSetting -InterfaceType Dedicated
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [Set-HPEiLOIPv4NetworkSetting], Exception
    + FullyQualifiedErrorId : HPE.iLO.Cmdlet.SetHPEiLOIPv4NetworkSetting

 

I am setting the interfacetype in my command as you can see above.  Verbose does not provide any useful information.  Is this a bug with the tools?

2 REPLIES 2
GokulKS
HPE Pro

Re: HPEILO Cmdlets Set-HPEILOIpv4NetworkSetting failing with CSV input

Hi,

 Its a incomplete input you have not provided the required mandatory parameters for the IPv4 network settings cmdlets.

Check Get-Help for any such help we have provided good working example sets.

$c | Set-HPEiLOIPv4NetworkSetting -InterfaceType Dedicated -DHCPEnabled No -IPv4Address 1.1.1.1 -IPv4Gateway 2.2.2.2 -IPv4SubnetMask 3.3.3.3 -DNSName testDNS -DomainName abcd.com -NICEnabled Yes -FullDuplex Enabled -LinkSpeedMbps 100

Get-Help Set-HPEiLOIPv4NetworkSetting -Examples

Thanks,

Gokul


I am a HPE Employee

Accept or Kudo

rookie1082
Frequent Advisor

Re: HPEILO Cmdlets Set-HPEILOIpv4NetworkSetting failing with CSV input

Hi Gokul, thank you for the reply.

What if I don't want to set all of the settings and only want to set a DNS name?  In the old ILO cmdlets (version 1.5) we could just input a CSV with server, username, password, DNSName and it would set only the DNS name with the cmdlet.  Do I always have to put each parameter each time even if I am not changing it?

My CSV file has DNSNames for every server but they are all different.  How would I use my CSV file to input the command to each server so that the unique IP address, DNSName, etc are set on each server at the same time?