Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Server with scope parameter #387

Closed
Schwitzd opened this issue Jan 22, 2019 · 2 comments
Closed

Add Server with scope parameter #387

Schwitzd opened this issue Jan 22, 2019 · 2 comments
Assignees
Labels
4.10 Impacts HPE OneView 4.10 library Question

Comments

@Schwitzd
Copy link

Schwitzd commented Jan 22, 2019

Expected Behavior

Add a server in a specific scope with the command:
Add-HPOVServer Srv01 -ApplianceConnection $session -Username Administrator -Password xxx -Scope Scope1 -monitored

Actual Behavior

> Add-HPOVServer : Cannot process argument transformation on parameter 'Scope'. Cannot convert the "Scope1" value of type "System.String" to type
> "HPOneView.Appliance.ScopeCollection".
> At line:1 char:108
> + ... ession -Username Administrator -Password xxx -Scope Scope1 -monito ...
> +                                                              ~~~~
>     + CategoryInfo          : InvalidData: (:) [Add-HPOVServer], ParameterBindingArgumentTransformationException
>     + FullyQualifiedErrorId : ParameterArgumentTransformationError,Add-HPOVServer

Steps to reproduce

Add-HPOVServer Srv01 -ApplianceConnection $session -Username Administrator -Password xxx -Scope Scope1 -monitored

Version Information

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

@ChrisLynchHPE
Copy link
Member

ChrisLynchHPE commented Jan 22, 2019

This isn't the proper use. You need to get the Scope resource object, and pass that into the -Scope Cmdlet parameter.

$MyScope = Get-HPOVScope -Name MyScope
Add-HPOVServer -Hostname Srv01 -Username Administrator -Password xxx -Scope $MyScope -monitored

The -ApplianceConnection parameter is not required unless you have multiple appliance connections, and need to target a specific appliance for the operation.

@ChrisLynchHPE ChrisLynchHPE self-assigned this Jan 22, 2019
@ChrisLynchHPE ChrisLynchHPE added Question 4.10 Impacts HPE OneView 4.10 library labels Jan 22, 2019
@ChrisLynchHPE
Copy link
Member

Closing due to no further activity. If you wish to continue discussing, feel free to re-open the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.10 Impacts HPE OneView 4.10 library Question
Projects
None yet
Development

No branches or pull requests

2 participants