HPE OneView
1820882 Members
3599 Online
109628 Solutions
New Discussion

Re: PowerShell Library for OneView 5.0

 
SOLVED
Go to solution
Vladislav1
Advisor

PowerShell Library for OneView 5.0

The new version of OneView 5.0 is already available, but the PowerShell.Library.exe libraries are still missing. A big request to post them as soon as possible

https://github.com/HewlettPackard/POSH-HPOneView/releases

Screenshot_1.png

 

10 REPLIES 10
ChrisLynch
HPE Pro

Re: PowerShell Library for OneView 5.0

As stated in the release notes on the same page, the installer will no longer be provided. It was only for Windows. With the library now cross platform via PowerShell Core, it is not needed. The library has been published in PowerShell Gallery ever since 3.10. If you need to install it on a system without Internet connectivity, use Save-Module, part of PowerShellGet module.
I work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
rmay_bk
Valued Contributor

Re: PowerShell Library for OneView 5.0

Hi Chris,

What's the best practice for upgrading our Powershell modules from 4.20 to 5.00?  Uninstall-Module doesn't seem to work against 4.20 so I just went to C:\Windows\System32\WindowsPowerShell\v1.0\Modules and I removed the HPOneView.420 folder.  Then I ran Install-Module -Name HPOneView.500.  Just wondering if there was a better way...

ChrisLynch
HPE Pro

Re: PowerShell Library for OneView 5.0

Each library Major.Minor release is not a direct upgrade for a prior one.  It coensides with the release of OneView.  They then support newer OneView versions due to its backwards compatible REST API.  But a newer library will not support an older version of OneView.  This is documented on the project Wiki main home page. 

So, unless you installed the 4.20 module using Install-Module, Uninstall-Module will not work.  the EXE installer does not register the module into the local Nuget repository.  You'd have to use Add/Remove Programs or Windows 10 Settings to remove the module.

I work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Vladislav1
Advisor

Re: PowerShell Library for OneView 5.0

Chris,

Just the version for windows is required.

When can I expect the release of exe version?

ChrisLynch
HPE Pro

Re: PowerShell Library for OneView 5.0


@Vladislav1 wrote:

Chris,

Just the version for windows is required.

When can I expect the release of exe version?


There will not be an EXE installer, as I explained above.

I work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Vladislav1
Advisor

Re: PowerShell Library for OneView 5.0

How then to upgrade libraries from 4.20 to version 5.0? I do not quite understand.

Write a little more details, please.

ChrisLynch
HPE Pro
Solution

Re: PowerShell Library for OneView 5.0

I provided more detail above:

Each library Major.Minor release is not a direct upgrade for a prior one.  It coincides with the release of OneView.  They then support newer OneView versions due to its backwards compatible REST API.  But a newer library will not support an older version of OneView.  This is documented on the project Wiki main home page. 

So, unless you installed the 4.20 module using Install-Module, Uninstall-Module will not work.  the EXE installer does not register the module into the local Nuget repository.  You'd have to use Add/Remove Programs or Windows 10 Settings to remove the module.

To re-iterate, there is no "Upgrade" from say 4.20 to 5.00  PowerShell library.  They are separate modules.  To install the 5.00 library, open a PowerShell 5.x/6.0 or PowerShellCore console, the type in Install-Module HPOneView.500 to install from PowerShell Gallery.  If you need to install the library on another system without Internet access then use Save-Module HPOneView.500, then copy the folder contents created to a directory in $env:PSModulesPath.  This is all standard PowerShell Gallery (via the PowerShellGet module) operations.

 

I work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Vladislav1
Advisor

Re: PowerShell Library for OneView 5.0

Everything worked out! Thank you

Anonymous
Not applicable

Re: PowerShell Library for OneView 5.0

Can I only install this on an Internet connected machine, or can I download the NuGet componenets the installer is asking for?

 

 

ChrisLynch
HPE Pro

Re: PowerShell Library for OneView 5.0

As it is documented on the Wiki, (which is in the process of moving to a new home), you will need to use Save-Module to save the contents of the module and dependancies.  You then transfer the ZIP and extract it to a directory that is in the $env:PSModulePath variable.

I work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo