HPE OneView
1748198 Members
2708 Online
108759 Solutions
New Discussion юеВ

Re: Update Enclosure Groups (configuration scripts) via PowerShell

 
SOLVED
Go to solution
Daniel-L
Advisor

Update Enclosure Groups (configuration scripts) via PowerShell

I'm looking for a way to "mass update" the configuration scripts of existing Enclosure Groups.

As there seems to be no Update- or Set-HPOVEnclosureGroup Commandlet I'm stuck with manually updating these scripts using the Web UI.

This is somewhat tiresome if you have multiple OneView instances with multple Enclsoure Groups each.

Any suggestions?

Thanks for your support!

Daniel

 

3 REPLIES 3
ChrisLynch
HPE Pro
Solution

Re: Update Enclosure Groups (configuration scripts) via PowerShell

In order to update the Configuration Script in an Enclosure Group, you will need to do the following:

 

# Get the Enclosure Group
$EnclosureGroup = Get-HPOVEnclosureGroup -Name MyEg -ErrorAction Stop

# Define the new c-Class OA Configuration Script
$NewConfigurationScript = '# This is my updated OA config script
# with multiple lines'

# Save the configuration script
$results = Send-HPOVRequest -Uri ($EnclosureGroup.uri + '/script') -Method PUT -Body $NewConfigurationScript

# Update associated Logical Enclosures
Get-HPOVLogicalEnclosure | Where-Object { $_.state -ne 'Consisent' } | Update-HPOVLogicalEnclosure -UpdateFromGroup

If you go to the HPE OneView PowerShell Github project, please open an issue for this, as I can then look at enhancing the library to support this workflow in a future release.  Please do include the version of the library you are using.


I am an HPE employee

Accept or Kudo

Daniel-L
Advisor

Re: Update Enclosure Groups (configuration scripts) via PowerShell

Hello Chris,

thanks for your reply and great support.

I've opened a new issue for this: Enhancement request: Update Enclosure Group configuration scripts #341

Regards,

Daniel

ChrisLynch
HPE Pro

Re: Update Enclosure Groups (configuration scripts) via PowerShell

Yes, I see the issue on the tracker.


I am an HPE employee

Accept or Kudo