HPE OneView
1833770 Members
2071 Online
110063 Solutions
New Discussion

Import of PS module HPEOneView 6.60 fails

 
MarcVL
Occasional Advisor

Import of PS module HPEOneView 6.60 fails

Dear,

I installed the HPEOneView 6.60 module on a Windows 2019 server. When In try to import the module, I get this error:

import-module : The module to process 'HPEOneView.660.psm1', listed in field 'ModuleToProcess/RootModule' of module manifest 'C:\Program Files\WindowsPowerShell\Modules\HPEOneView.660\6.60.3530.1622\HPEOneView.660.psd1' was not
processed because no valid module was found in any module directory.
At line:1 char:1
+ import-module -Name HPEOneView.660 

 

How can I fix this?

Best regards, Marc.

15 REPLIES 15
ChrisLynch
HPE Pro

Re: Import of PS module HPEOneView 6.60 fails

How did you install 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
MarcVL
Occasional Advisor

Re: Import of PS module HPEOneView 6.60 fails

Chris,

 

Thanks for your reply. My first problem is to create an environment where I can download the PS module from Internet. To this end, I open a PS window as Administrator on a Windows 2016 server this time. The proxy to Internet does work, I can browse websites like ibm.com and nytimes.com. Here is the command to check if the module exists:

Find-Module -Name HPEOneView.660

Hmm, it does not exist in the location where PS looks. Get-PSRepository shows that it searches in www.powershellgallery.com/api/v2.  But when plugging that URL into a browser, I get no ‘good’ reply. The URL that works is www.powershellgallery.com and I see module HPEOnneView.660 in https://www.powershellgallery.com/packages?q=hpeone. How do I change the URL where Find-Module looks for modules to www.powershellgallery.com ? Or do you have another suggestion to proceed?

Marc.

ChrisLynch
HPE Pro

Re: Import of PS module HPEOneView 6.60 fails

Microsoft has Cmdlets that will help you here.  It is documented in a number of places, including on the main GitBook library documentation page (HPE OneView Library Installer Changes), or you can read about the Save-Module Cmdlet from Microsoft's PowerShellGet module to obtain any published module from PSGallery and save it locally on an Internet connected system.  To then transfer the saved content to another non-Internet accessible system. 

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

Re: Import of PS module HPEOneView 6.60 fails

Chris,

Thanks for your reply. I managed to download the directory tree for module HPEOneView.660 and stored it in C:\Temp. The .psm1 file for it is three levels deep in the tree.

I tried to import it using "Import-Module C:\Temp\HPEOneView.660" but the shell told me this:

PS C:\temp> Import-Module -name C:\Temp\HPEOneView.660
At C:\Temp\HPEOneView.660\6.60.3530.1622\HPEOneView.660.psm1:1331 char:34
+ ... static [void] WriteMessage ([HPEOneView.Appliance.Connection]$_Appli ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [HPEOneView.Appliance.Connection].
At C:\Temp\HPEOneView.660\6.60.3530.1622\HPEOneView.660.psm1:1354 char:27
+ ... static [void] Write ([HPEOneView.Library.ApplianceConnection]$Applia ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [HPEOneView.Library.ApplianceConnection].
At C:\Temp\HPEOneView.660\6.60.3530.1622\HPEOneView.660.psm1:1366 char:27
+ static [void] Write ([HPEOneView.Appliance.Connection]$Appliance)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [HPEOneView.Appliance.Connection].
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TypeNotFound

Import-Module : The module to process 'HPEOneView.660.psm1', listed in field 'ModuleToProcess/RootModule' of module
manifest 'C:\Temp\HPEOneView.660\6.60.3530.1622\HPEOneView.660.psd1' was not processed because no valid module was found in any module directory.
At line:1 char:1
+ Import-Module -name C:\Temp\HPEOneView.660
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (HPEOneView.660:String) [Import-Module], PSInvalidOperationExceptio
n
+ FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

 

So how do I install a Powershell module that is local to my laptop?

Marc.

ChrisLynchHPE
Frequent Visitor

Re: Import of PS module HPEOneView 6.60 fails

What version of PowerShell are you using?  Provide the output from $PSVersionTable.

MarcVL
Occasional Advisor

Re: Import of PS module HPEOneView 6.60 fails

Crhis,

 

Here is the requested output:

 

PS C:\temp> $PSVersionTable

Name Value
---- -----
PSVersion 5.1.19041.2673
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.2673
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

This runs on Windows 10 20H2.

Marc.

ChrisLynchHPE
Frequent Visitor

Re: Import of PS module HPEOneView 6.60 fails

<DUPLICATE TO BE DELETED>

ChrisLynch
HPE Pro

Re: Import of PS module HPEOneView 6.60 fails

Are you not able to use PowerShell 7?

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

Re: Import of PS module HPEOneView 6.60 fails

Chris,

I can try to install that. Will do so now.

Marc.

MarcVL
Occasional Advisor

Re: Import of PS module HPEOneView 6.60 fails

Chris.

Wow. After install PS 7.x, the import of the OneView module ran in 1 second, no errors. Looks great. Too bad I did not see anywhere that PS 7.x is required. I must have overlooked it.

Big thanks for your prompt help. Very appreciated.

Marc.

MarcVL
Occasional Advisor

Re: Import of PS module HPEOneView 6.60 fails

@ChrisLynch 

Looks like my last post did not make it to the forum. After installing PS 7.x, all was finer: I could import the OneView 6.60 module and connect to my Synergy. To force a reset by eFuse, I ran this command on my SY480 in Bay 1:

PS C:\Temp> Reset-OVEnclosureDevice -Enclosure (Get-OVEnclosure -Name Synergy_velo) -Component Device -DeviceID 1 -Efuse
WARNING: The command 'Get-OVEnclosure' is obsolete and will no longer be supported with HPE Synergy in the next major release.

Confirm
Are you sure you want to perform this action?
Performing the operation "Reset power for device" on target "Device 1 within Synergy_velo".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
Reset-OVEnclosureDevice: Cannot validate argument on parameter 'Hostname'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.

 

The command fails with a strange error: where do I need to give the 'Hostname' parameter? Here is the output of the Get-Enclosure command:

 

PS C:\Temp> Get-OVEnclosure -Name Synergy_velo
WARNING: The command 'Get-OVEnclosure' is obsolete and will no longer be supported with HPE Synergy in the next major release.

Name Model State Serial Number Rack Enclosure Group Populated Bays
---- ----- ----- ------------- ---- --------------- --------------
Synergy_velo SY12000 Configured MXQ7440294 EG_velo 10/12

 

Marc.

MarcVL
Occasional Advisor

Re: Import of PS module HPEOneView 6.60 fails

Chris,

Are you still available to look into this error? I tried a few variants of the command but nothing worked.

Marc.

ChrisLynch
HPE Pro

Re: Import of PS module HPEOneView 6.60 fails

I have a pending update to the 6.60 library that will address this.  Is your Synergy Composer at OneView 6.60? 

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

Re: Import of PS module HPEOneView 6.60 fails

@ChrisLynch 

Chris,

 

Thanks for your reply. Here is the output of the command Get-OVComposerNode:

 

PS C:\Users\marcvanl> Get-OVComposerNode

Appliance Name State Status Model Version Role
--------- ---- ----- ------ ----- ------- ----
172.17.5.210 Synergy_velo, appliance bay 1 OK Warning Synergy Composer 6.60.03-0473865 Active

 

Best regards,

 

Marc.

TomWn
Occasional Advisor

Re: Import of PS module HPEOneView 6.60 fails

@ChrisLynch 

Hi Chris, we're running into the same issue on some legacy frames.  Any resolution on this one?

 

PS C:\Users\tomw> Reset-OVEnclosureDevice -InputObject $enc -Component Device -DeviceID 4 -Efuse -Confirm:0
Reset-OVEnclosureDevice: Cannot validate argument on parameter 'Hostname'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.

PS C:\Users\tomw> $enc

Name Model State Serial Number Rack Enclosure Group Populated Bays
---- ----- ----- ------------- ---- --------------- --------------
R4902F2 SY12000 Configured **removed** CHAVIC_EG 12/12

 

[Moderator edit: Erased the confidential info.]