HPE OneView
1748082 Members
5210 Online
108758 Solutions
New Discussion

HPOneView Posh

 
FabSan
Occasional Advisor

HPOneView Posh

not able to run any cmds after loading the hponeview.120 module in powershell.

 

any ideas?

after loading get-help returns this

 

Method not Found: 'System.Object System.Reflection.PropertyInfo.GetValue(System.Object)'

 

get-help works before the module is loaded

 

2 REPLIES 2
ChrisLynch
HPE Pro

Re: HPOneView Posh

While we encourage customers and partners to discuss HP OneView here in these forums, please submit this issue to the POSH-HPOneView GitHub Issues Tracker.  When opening an issue, please be very specific with what version of the library you downloaded, and what PowerShell version you have (output from $PSVersionTable should be provided), and include a screenshot of the error as well.


I am an HPE employee

Accept or Kudo

ChrisLynch
HPE Pro

Re: HPOneView Posh

I know this is an old thread, but I just found the resolution.  When I published an updated 1.20 library, I added a required module (FormatPX) that addresses a limitation currently found in PowerShell; using Format-Table, Format-List or Format-Wide would change the source object to Microsoft.PowerShell.Commands.Internal.Format.  This would cause objects to lose their original data type.  FormatPX uses a C# .Net Reflection method that is apparently only found in the 4.5 and 4.6 .Net Client.  If you install either the 4.5 or 4.6 .Net Client Library, this will resolve the issue your experiencing.

 

To find out what version of the .Net Client you have, open a PowerShell console and execute $PSVersiontable.  If the CLRVersion value is 4.0.30319.1026 or older, you have the 4.0 .Net Client installed.  If you install the 4.6 .Net Client, the CLRVersion will be 4.0.30319.42000.

 

I will be updating the installer and documentation to detect and note this change.


I am an HPE employee

Accept or Kudo