HewlettPackard / POSH-HPEOneView

PowerShell language bindings library for HPE OneView.
http://hewlettpackard.github.io/POSH-HPEOneView/
125 stars 52 forks source link

Import-Module HPEOneView.830 fails #641

Open PeterM-vLabs opened 1 year ago

PeterM-vLabs commented 1 year ago

Expected Behavior

Module imports successfully.

Actual Behavior

PS C:\Users\Administrator> Import-Module HPEOneView.830
At C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psm1:1323 char:34
+ ...  static [void] WriteMessage ([HPEOneView.Appliance.Connection]$_Appli ...
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [HPEOneView.Appliance.Connection].
At C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psm1:1335 char:61
+ ... ecord]::new([HPEOneView.Library.UnsupportedOperationException]::new($ ...
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [HPEOneView.Library.UnsupportedOperationException].
At C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psm1:1341 char:27
+ ...  static [void] Write ([HPEOneView.Library.ApplianceConnection]$Applia ...
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [HPEOneView.Library.ApplianceConnection].
At C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psm1:1353 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.830.psm1', listed in field 'ModuleToProcess/RootModule' of module
manifest 'C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psd1' was not
processed because no valid module was found in any module directory.
At line:1 char:1
+ Import-Module HPEOneView.830
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (HPEOneView.830:String) [Import-Module], PSInvalidOperationExceptio
   n
    + FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

### Steps to reproduce

```PowerShell
PS C:\Users\Administrator> Import-Module HPEOneView.830 -verbose
VERBOSE: Loading module from path 'C:\Program
Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psd1'.
VERBOSE: Cannot verify the Microsoft .NET Framework version 4.7.2 because it is not included in the list of permitted
versions.
VERBOSE: Loading 'Assembly' from path 'C:\Program
Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\lib\HPEOneView_Classes.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program
Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\lib\HPEOneView_Classes.dll'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\Program
Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\Appliance.format.ps1xml'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\Program
Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\Cluster.format.ps1xml'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\Program
Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\Networking.format.ps1xml'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\Program
Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\Server.format.ps1xml'.
VERBOSE: Loading 'FormatsToProcess' from path 'C:\Program
Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\Storage.format.ps1xml'.
VERBOSE: Populating RepositorySourceLocation property for module HPEOneView.830.
VERBOSE: Loading module from path 'C:\Program
Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psm1'.
At C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psm1:1323 char:34
+ ...  static [void] WriteMessage ([HPEOneView.Appliance.Connection]$_Appli ...
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [HPEOneView.Appliance.Connection].
At C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psm1:1335 char:61
+ ... ecord]::new([HPEOneView.Library.UnsupportedOperationException]::new($ ...
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [HPEOneView.Library.UnsupportedOperationException].
At C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psm1:1341 char:27
+ ...  static [void] Write ([HPEOneView.Library.ApplianceConnection]$Applia ...
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unable to find type [HPEOneView.Library.ApplianceConnection].
At C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psm1:1353 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.830.psm1', listed in field 'ModuleToProcess/RootModule' of module
manifest 'C:\Program Files\WindowsPowerShell\Modules\HPEOneView.830\8.30.3515.1690\HPEOneView.830.psd1' was not
processed because no valid module was found in any module directory.
At line:1 char:1
+ Import-Module HPEOneView.830 -verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (HPEOneView.830:String) [Import-Module], PSInvalidOperationExceptio
   n
    + FullyQualifiedErrorId : Modules_ModuleFileNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Version Information

HPE OneView PowerShell Library Version (Get-HPOVVersion or $PSLibraryVersion): HPE OneView Appliance Version (Get-HPOVVersion -ApplianceVer):
Output from $PSVersionTable on your Windows Host:

# Output from $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.14409.1005
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1005
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
ChrisLynchHPE commented 1 year ago

Unfortunately, the support for PowerShell 5.x will no longer be carried forward. Please migrate to using PowerShell 7.x.