Closed wingZero21 closed 8 years ago
Oddly I have noticed that if I use a dns entry without a dash or numbers this does seem to work fine.
Is there any strangeness with this when using a - or numbers within the hostname?
PS C:\Users\vagrant> Connect-HPOVMgmt -appliance "ov.domain.com" -Username api -Password "z8eYWasa12bhu5"
WARNING: You are already connected to ov.domain.com
PS C:\Users\vagrant> Connect-HPOVMgmt -appliance "ovdc1.domain.com" -Username api -Password "z8eYWasa12bhu5"
Exception calling "RemoveAt" with "1" argument(s): "Index was out of range. Must be non-negative and less than the
size of the collection.
Parameter name: index"
At C:\Users\vagrant\Documents\WindowsPowerShell\Modules\HPOneView.200\HPOneView.200.psm1:6589 char:5
+ [void]${Global:ConnectedSessions}.RemoveAt($_ndx)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentOutOfRangeException
Connect-HPOVMgmt : Cannot process argument transformation on parameter 'Appliance'. Cannot convert value to type
System.String.
At line:1 char:1
+ Connect-HPOVMgmt -appliance "ovdc1.domain.com" -Username api -Password "z8eY ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Connect-HPOVMgmt], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Connect-HPOVMgmt
Your first example does not show any hyphens in the FQDN, which does not matter. When we look in the $Global:ConnectionSessions
variable, we look to see if the Hostname or ApplianceConnection parameter value equals (using the -eq
comparison operator), and then get the correct ApplianceConnection object. I use numbers in my FQDN's all of the time, and have not seen this behavior during any form of testing. Can you provide an example of the FQDN's you are trying to use?
I believe I found the problem and fixed it. Please try Release 2.0.436.0.
Hey,
Cheers for taking a look at this. I will try the latest version and let you know if it sorts it.
Cheers Mark
Hi,
When attempting to connect with the new version it mentions the appliance version. Does the OneView appliance need to be updated to use this new client?
Cheers Mark
Details:
Connect-HPOVMgmt : The appliance you are connecting to supports an older version of this library. Please visit
https://github.com/HewlettPackard/POSH-HPOneView for a supported version of the library.
At line:1 char:1
+ Connect-HPOVMgmt -appliance "ovdc1.domain.com" -Username user -Password " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (ovdc1.domain.com:String) [Connect-HPOVMgmt], NotImplementedExce
ption
+ FullyQualifiedErrorId : LibraryTooNew,Connect-HPOVMgmt
Just to confirm it looks like after getting the certificate this has fixed the issue though.
After importing the cert however it does indeed seem to be taking the backup as expected.
Thanks very much for sorting that.
Cheers Mark
When attempting to connect with the new version it mentions the appliance version. Does the OneView appliance need to be updated to use this new client?
Can you tell me what version of the appliance you were attempting to connect to? If the appliance is older than 2.00, the library is incompatible with the library version you are trying to use. Essentially, you need the Major.Minor
library version to match that of the HPE OneView appliance's Major.Minor
version. The exception is when you have a newer appliance and you wish to use an older library version for script backwards compatibility purposes. The library keys off of the appliances supported API versions.
Hi,
When trying to test taking a backup or running other commands I am getting the below error. I currently have details in connected sessions. Can you advise what might be causing this to occur.
Details:
Error:
Version Information
HPE OneView PowerShell Library Version (
Get-HPOVVersion
):HPE OneView Appliance Version:
Output from
$PSVersionTable
on your Windows Host: