HPE OneView makes it simple to deploy and manage today’s complex hybrid cloud infrastructure. HPE OneView can help you transform your data center to software-defined, and it supports HPE’s broad portfolio of servers, storage, and networking solutions, ensuring the simple and automated management of your hybrid infrastructure. Software-defined intelligence enables a template-driven approach for deploying, provisioning, updating, and integrating compute, storage, and networking infrastructure.
This library enables PowerShell developers, IT automation engineers, or devops personel the ability to utilize HPE OneView's open REST API to automate infrastructure policies and operations. Starting with the HPE OneView 5.00 PowerShell library, PowerShell Core is now supported.
The major changes are:
- Changing
HPOneView_Classes
class module from targeting DotNet Framework 4.6 to DotNet Standard 2.0. This will require DotNet Framework 4.7.1 for Windows at a minimum, which means Windows 10 1709 or newer will be required. It also means that Windows Management Framework 4.0 is no longer supported. - Support Windows PowerShell 5.1 and 7.x for Windows, and PowerShellCore 7.x for Mac and Linux.
- Unified library for the supported PowerShell and PowerShellCore versions.
- With the deprecation of PowerShell 4.0, the EXE installer is also deprecated. Microsoft provides built-in PowerShellGet support to save published modules from PowerShell Gallery, by using the
Save-Module
Cmdlet.
AppVeyor 9.10 Branch | AppVeyor 9.00 Branch | AppVeyor 8.60 Branch | AppVeyor 6.60 Branch |
---|---|---|---|
To get started, use the Install-Module
Cmdlet to install from the PowerShell Gallery to your local system.
# Install library from the PowerShell Gallery
Install-Module HPEOneView.910
# Load the module
Import-Module HPEOneView.910
# Connect to your appliance
Connect-OVMgmt -Hostname MyAppliance.FQDN.Name -Credential $MyOneViewCredential
Windows Services for Linux (WSL) is tested and supported using the Ubuntu 18.04 image from the Windows Store. To test and use WSL, Windows 10 1709 (aka Windows 10 Creaters Fall Update) or newer is required. Please see this Microsoft document for further instructions.
For Linux distributions and appliances with a CA signed/issued certificate, you will need to make sure the issuing CA, and CA chain, is exported to PEM format, and placed within the OS SSL cert trusts location. For Ubuntu 18.04, you can:
- Place the CA cert in PEM format (the cert format that starts with
-----BEGIN CERTIFICATE-----
) into/usr/local/shared/ca-certificates
. - Execute
sudo update-ca-certificates
binary, which should look something like:
chris@desktop2:~$ sudo update-ca-certificates
Updating certificates in /etc/ssl/certs...
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
- If there are any additional cert errors and you simply want to test basic functionality, you can override certificate validation for the library using the following:
# NOTE: This is NOT supported in production as this is a security risk.
[HPEOneView.PKI.SslValidation]::IgnoreCertErrors = $true
The library normally uses FormatPX to fix formatting issues with the Microsoft provided core cmdlets Format-List and Format-Table. However, FormatPX is not currently supported in PowerShellCore yet. So, when attempting to use the default parameter set of Get-OVNetwork
, which can return multiple network resource types, only the first network type will properly display. The rest (like Fibre Channel or Fibre Channel over Ethernet) will display their full object properties.
The Get-OVCommandTrace Cmdlet will generate the required output. But due to a limitation in the DotNet Standard API, a prior used API is no longer available, resulting in Verbose and Debug messages from the HPE OneView C# Class Library to not be captured. When reporting errors, and using the Cmdlet, or if you invoke [HPEOneView.Config]::EnableVerbose = $true
and/or [HPEOneView.Config]::EnableDebug = $true
, the generated output should be recaptured by Select All, copy and then paste into the created log file.
First, read the manual. Cmdlets are documented here in a new doc repository. The project wiki is no longer maintained, and will be removed in a future update.
Are you running into a road block? Have an issue with unexpected bahriov? Feel free to open a on the tracker.
You have a general question about the library? For general questions, or need to discuss a topic that doesn't need to be tracked in the issue tracker, please join the new GitHub Discussions for the project:
Still available, but not actively maintained Gitter.im chat room: