HPE OneView
cancel
Showing results for 
Search instead for 
Did you mean: 

Add server with multiple scopes using PowerShell

 
SOLVED
Go to solution
NJK-Work
Honored Contributor

Add server with multiple scopes using PowerShell

OK to  post OneView PowerShell questions in this forum?  If so, here is my question:

Is it possible to specify multiple scopes when using Add-HPOVServer?  The Help says it is an "array" but when I try to specify multiple scopes it fails.  When I try just one scope, it works fine.

In our environment, we have one scope for All Windows servers - so that the team that supports WIndows servers can SEE and MANAGE those devices.  Then we have one or more additional scopes just for alerts.  So if a server is in the "Jonny's Servers" scope, only Jonny will get the email alerts for those servers.  So thus a server could be in two different scopes.

I have tried this:

Add-HPOVServer -ApplianceConnection $Conn -Hostname "SERVERILO" -Credential $ILOCred -Scope $Scope1, $Scope2 -Monitored:$true

and also creating an array of scopes, using the Get-HPOVScope cmdlet and a WHERE-OBJECT clause:

Add-HPOVServer -ApplianceConnection $Conn -Hostname "SERVERILO" -Credential $ILOCred -Scope $Scopes -Monitored:$true

But both attempts fails.  It seems like it will only accept a single scope, not an array.  The help says this (which you can see mentions array):

-Scope [<Array>]
Provide an array of <HPOneView.Appliance.ScopeResource> Scope resource(s) to initially add.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

Any suggestions on what I am doing wrong?

Thanks

NK

2 REPLIES 2
ChrisLynch
Neighborhood Moderator
Solution

Re: Add server with multiple scopes using PowerShell

This is a bug.  You already submitted an issue to the tracker.  So please continue this discussion over there.


I am an HPE employee

Accept or Kudo

NJK-Work
Honored Contributor

Re: Add server with multiple scopes using PowerShell

Apologies - I discovered the GitHub repo after posting on this forum.

Thanks for the help so far.