Closed erikgraa closed 3 years ago
It seems like the Login Message does in fact get changed in spite of the error.
The -ApplianceConnection
parameter is only necessary if you plan on instantiating connections to multiple HPE OneView appliances. If you are not, you can omit the parameter. Please see the about_ApplianceConnections help topic.
As for the reported bug, I see what is causing it, and will be in the next update.
I can confirm this now works.
Seems to always return a Get-OVLoginMessage
PSObject. Is a -PassThru
parameter in order to align with other similar Cmdlets?
Seems to always return a Get-OVLoginMessage PSObject. Is a -PassThru parameter in order to align with other similar Cmdlets?
Not sure I understand what you mean. The -Passthru
switch is to return an object back to the pipeline without further processing. Only the New-OVServerProfile
and New-OVServerProfileTemplate
today support the -Passthru
switch. That is mainly to return the profile objects if you wish to edit them before sending off to the API to create them if there isn't a native Cmdlet to configure something. I did that for when I didn't have Cmdlets to edit or manage iLO settings supported in both resource types.
So no, there are no plans to add this to something like Get-OVLoginMessage
. There really is no point.
Set-OVApplianceSshAccess
returns a task object (i.e. not the same as Get-OVApplianceSshAccess
, whereas Set-OVApplianceServiceConsoleAccess
returns the same as and Get-OVApplianceServiceConsoleAccess
and Set-OVLoginMessage
returns the same output as Get-OVLoginMessage
Thus I was wondering if it's intentional that these 3 Cmdlets exhibit different (two kinds) of behavior.
This is all outlined in the user documentation and is the byproduct of how the REST API works. So yes, this is intentional. I am not going to change the output behavior of what the API does just for the sake of PowerShell. This behavior is exactly the same we have with our other scripting tools, like Python or Ruby.
This is now addressed in the following releases:
Closing.
Expected Behavior
Set-OVLoginMessage -Message 'This is a Test Login Message' -Acknowledge $true -ApplianceConnection $ConnectedSessions[0]
or
Set-OVLoginMessage -Message 'This is a Test Login Message' -Acknowledge $true -ApplianceConnection "<name from $ConnectedSessions[0]"
Actual Behavior
Set-OVLoginMessage: CAannot convert argument "applianceConnection", with value: "" for ".ctor" to type "HPEOneView.Library.ApplianceConnection": "Cannot convert the "" value of type "HPEoneView.Appliance.Connection" to type "HPEOneView.Library.ApplianceConnection".
Steps to reproduce
See above.
Version Information
HPE OneView PowerShell Library Version (
Get-HPOVVersion
or$PSLibraryVersion
): 5.50.2591.2980 HPE OneView Appliance Version (Get-HPOVVersion -ApplianceVer
): 5.50.00.426657.00 Output from$PSVersionTable
on your Windows Host: 5.1.17763.1432