Skip to content

Add HPOVResourceToLabel

Chris Lynch edited this page Mar 31, 2020 · 20 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-HPOVResourceToLabel

Syntax

Add-HPOVResourceToLabel [-Name] <String> [-InputObject] <Object> [[-ApplianceConnection] <Object>] [<CommonParameters>]

Description

Labels identify resources so that you can organize them into groups. After labeling your resources, you can quickly view them by searching on the labels. For example, you might want to identify the servers that are used primarily by the Finance team, or identify the storage systems assigned to the Asia/Pacific division.

Resources supporting labels also have filters to allow you to filter by the labels that have been placed on the resource. The global search can be used to search for resources by label.

Using this Cmdlet will add supported resources to a new or existing Label. If the Label does not exist, it will be created.

Minimum required privileges: Edit privileges for the resource.

Parameters

-ApplianceConnection <Object>

Specify one or more [HPOneView.Appliance.Connection] object(s) or Name property value(s).

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

-InputObject <Object>

The collection of resources to associate the label with.

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

-Name <String>

The name of the Label to associate resources to. If Label does not exist, a new one will be created.

Aliases None
Required? True
Position? 0
Default value
Accept pipeline input? false
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

System.Array

Collection of resources to associate with the label.

Return Values

System.Management.Automation.PSCustomObject

The created or modified Label resource.

Examples

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

$Resources = Get-HPOVNetwork -Name Finance* -ErrorAction Stop $Resources += Get-HPOVServerHardware -Name Finance* Add-HPOVResourceToLabel -Name Finance -InputObject $Resources

Collect various resources for Finance, creating a new label called "Finance".

Related Links


HPE OneView

Library

4.20

Add-HPOVResourceToLabel

Syntax

Add-HPOVResourceToLabel [-Name] <String> [-InputObject] <Object> [[-ApplianceConnection] <Object>] [<CommonParameters>]

Description

Labels identify resources so you can organize them into groups. For example, you might want to identify the servers that are used primarily by the Finance team, or identify the storage systems assigned to the Asia/Pacific division.

This Cmdlet will allow you to add resources to a new label. If the Label does not exist, a new one will be created.

Parameters

-ApplianceConnection <Object>

Aliases [-Appliance]

Specify one or more HPOneView.Appliance.Connection object(s) or Name property value(s).

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

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

-InputObject <Object>

The collection of resources to associate the label with.

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

-Name <String>

The name of the Label to associate resources to. If Label does not exist, a new one will be created.

Aliases None
Required? true
Position? 0
Default value
Accept pipeline input? false
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

System.Array

Collection of resources to associate with the label.

Return Values

System.Management.Automation.PSCustomObject

The created or modified Label resource.

Examples

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

$Resources = Get-HPOVNetwork -Name Finance* -ErrorAction Stop $Resources += Get-HPOVServerHardware -Name Finance* Add-HPOVResourceToLabel -Name Finance -InputObject $Resources

Collect various resources for Finance, creating a new label called "Finance".

Related Links


HPE OneView

Library

4.10

Add-HPOVResourceToLabel

Syntax

Add-HPOVResourceToLabel [-Name] <String> [-InputObject] <Object> [[-ApplianceConnection] <Object>] [<CommonParameters>]

Description

Labels identify resources so you can organize them into groups. For example, you might want to identify the servers that are used primarily by the Finance team, or identify the storage systems assigned to the Asia/Pacific division.

This Cmdlet will allow you to add resources to a new label. If the Label does not exist, a new one will be created.

Parameters

-ApplianceConnection <Object>

Aliases [-Appliance]

Specify one or more HPOneView.Appliance.Connection object(s) or Name property value(s).

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

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

-InputObject <Object>

The collection of resources to associate the label with.

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

-Name <String>

The name of the Label to associate resources to. If Label does not exist, a new one will be created.

Aliases None
Required? true
Position? 0
Default value
Accept pipeline input? false
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

System.Array

Collection of resources to associate with the label.

Return Values

System.Management.Automation.PSCustomObject

The created or modified Label resource.

Examples

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

$Resources = Get-HPOVNetwork -Name Finance* -ErrorAction Stop $Resources += Get-HPOVServerHardware -Name Finance* Add-HPOVResourceToLabel -Name Finance -InputObject $Resources

Collect various resources for Finance, creating a new label called "Finance".

Related Links


Wiki Table of Contents

Clone this wiki locally