Skip to content

Add HPOVResourceToScope

Chris Lynch edited this page Mar 31, 2020 · 23 revisions

ℹ️ Note: This Wiki is no longer the source for HPE OneView PowerShell Library documentation. The new location is here.

Please update your local offline help system using Get-Help <ModuleName> to dwonload the latest offline help contents.

HPE OneView

Library

5.00

Add-HPOVResourceToScope

Syntax

Add-HPOVResourceToScope [-Scope] <HPOneView.Appliance.ScopeCollection[]> [-InputObject] <Object> [[-Async] <SwitchParameter>] [[-ApplianceConnection] <Object>] [<CommonParameters>]

Description

A scope is a grouping of resources that can be used to restrict the range of an operation or action. For example, you can create scopes based on:

* Organization or department (Marketing, Research and Development, Finance)
* Usage (Production, Development, Testing)
* Skills (Linux, Windows)

For example, a data center could be organized so that all servers running Linux are monitored using one scope and all servers running MS Windows are monitored using another scope. Email notifications can be configured such that Windows technicians are notified for issues on the servers running Windows and Linux technicians are notified for issues on the servers running Linux.

When scopes are defined and resources assigned to them, you can:

* Restrict the resources displayed in the user interface (UI) to those assigned to the scope.
* Restrict user permissions to grant access only to the resources in a scope.
* Configure filtered email notifications for alerts based on previously-defined scopes.

This Cmdlet will add supported resources to a specified Scope. All the resources in these categories can be added to or removed from a scope:

* Enclosure Groups
* Enclosures
* Logical Enclosures
* Server Hardware
* Rack Managers
* Server Profiles
* Server Profile Templates
* OS Deployment Plans
* Networks (Ethernet, FC, and FCoE)
* Network Sets
* Hypervisor Cluster Profiles, Hypervisor Profiles, Hypervisor Managers
* Interconnects, excluding SAS resources
* Logical Interconnects, excluding SAS resources
* Logical Interconnect Groups, excluding SAS resources
* Switches
* Logical Switches
* Logical Switch Groups
* Storage Pools
* Volume Sets
* Volume Templates
* Volumes

NOTE: Resources in other categories are considered to be included in all scopes, and they cannot be removed.

Minimum required privileges: Infrastructure administrator, scope administrator, scope operator

Parameters

-ApplianceConnection <Object>

Specify one HPOneView.Appliance.Connection object or Name property value.

Aliases Appliance
Required? False
Position? named
Default value (${Global:ConnectedSessions} | ? Default)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?    False

-Async <SwitchParameter>

Use this parameter to immediately return the async task. By default, the Cmdlet will wait for the task to complete.

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

-InputObject <Object>

The supported resource object to add to the intended scope provided in the -Scope parameter.

Aliases Resource
Required? True
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-Scope <HPOneView.Appliance.ScopeCollection[]>

The Scope resource to add the resource(s) to.

Aliases None
Required? True
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters?    False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216)

Input Types

HPOneView.Appliance.ScopeCollection

Scope resource object from Get-HPOVScope.

Return Values

HPOneView.Appliance.TaskResource [System.Management.Automation.PSCustomObject]

Asynchronous task resource that updates the Scope and associated resources.

Examples

 -------------------------- EXAMPLE 1 --------------------------

$Resources += Get-HPOVNetwork -Name ProdVLan* $Resources += Get-HPOVServer -Name Encl1* Get-HPOVScope -Name MyScope | Add-HPOVResourceToScope -InputObject $Resources

Add the resources collected to the MyScope scope.

Related Links


HPE OneView

Library

4.20

Add-HPOVResourceToScope

Syntax

Add-HPOVResourceToScope [-Scope] <HPOneView.Appliance.ScopeCollection> [-InputObject] <Object> [[-Async] <SwitchParameter>] [[-ApplianceConnection] <Array>] [<CommonParameters>]

Description

This Cmdlet will add supported resources to a specified Scope.. All the resources in these categories can be added to or removed from a scope:

* Enclosures
* Server Hardware
* Networks (Ethernet, FC, and FCoE)
* Network Sets
* Interconnects, excluding SAS resources
* Logical Interconnects, excluding SAS resources
* Logical Interconnect Groups, excluding SAS resources
* Switches
* Logical Switches
* Logical Switch Groups

NOTE: Resources in other categories are considered to be included in all scopes, and they cannot be removed.

Minimum required privileges: Infrastructure administrator

Parameters

-ApplianceConnection <Array>

Aliases [-Appliance]

Specify one HPOneView.Appliance.Connection object or Name property value.

Default Value: ${Global:ConnectedSessions} | ? Default

Aliases Appliance
Required? false
Position? named
Default value (${Global:ConnectedSessions} | ? Default)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?    False

-Async <SwitchParameter>

Use this parameter to immediately return the async task. By default, the Cmdlet will wait for the task to complete.

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

-InputObject <Object>

Specify to return asyncronous task after file upload has completed.

Aliases Resource
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-Scope <HPOneView.Appliance.ScopeCollection>

The Scope resource to add the resource(s) to.

Aliases None
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters?    False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216)

Input Types

HPOneView.Appliance.ScopeCollection

Scope resource object from Get-HPOVScope.

Return Values

HPOneView.Appliance.TaskResource [System.Management.Automation.PSCustomObject]

Asyncronous task resource that updates the Scope and associated resources.

Examples

 -------------------------- EXAMPLE 1 --------------------------

$Resources += Get-HPOVNetwork -Name ProdVLan* $Resources += Get-HPOVServer -Name Encl1* Get-HPOVScope -Name MyScope | Add-HPOVResourceToScope -InputObject $Resources

Add the resources collected to the MyScope scope.

Related Links


HPE OneView

Library

4.10

Add-HPOVResourceToScope

Syntax

Add-HPOVResourceToScope [-Scope] <HPOneView.Appliance.ScopeCollection> [-InputObject] <Object> [[-Async] <SwitchParameter>] [[-ApplianceConnection] <Array>] [<CommonParameters>]

Description

This Cmdlet will add supported resources to a specified Scope.. All the resources in these categories can be added to or removed from a scope:

* Enclosures
* Server Hardware
* Networks (Ethernet, FC, and FCoE)
* Network Sets
* Interconnects, excluding SAS resources
* Logical Interconnects, excluding SAS resources
* Logical Interconnect Groups, excluding SAS resources
* Switches
* Logical Switches
* Logical Switch Groups

NOTE: Resources in other categories are considered to be included in all scopes, and they cannot be removed.

Minimum required privileges: Infrastructure administrator

Parameters

-ApplianceConnection <Array>

Aliases [-Appliance]

Specify one HPOneView.Appliance.Connection object or Name property value.

Default Value: ${Global:ConnectedSessions} | ? Default

Aliases Appliance
Required? false
Position? named
Default value (${Global:ConnectedSessions} | ? Default)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?    False

-Async <SwitchParameter>

Use this parameter to immediately return the async task. By default, the Cmdlet will wait for the task to complete.

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

-InputObject <Object>

Specify to return asyncronous task after file upload has completed.

Aliases Resource
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-Scope <HPOneView.Appliance.ScopeCollection>

The Scope resource to add the resource(s) to.

Aliases None
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters?    False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216)

Input Types

HPOneView.Appliance.ScopeCollection

Scope resource object from Get-HPOVScope.

Return Values

HPOneView.Appliance.TaskResource [System.Management.Automation.PSCustomObject]

Asyncronous task resource that updates the Scope and associated resources.

Examples

 -------------------------- EXAMPLE 1 --------------------------

$Resources += Get-HPOVNetwork -Name ProdVLan* $Resources += Get-HPOVServer -Name Encl1* Get-HPOVScope -Name MyScope | Add-HPOVResourceToScope -InputObject $Resources

Add the resources collected to the MyScope scope.

Related Links


Wiki Table of Contents

Clone this wiki locally