Skip to content

New HPOVServerProfileAssign

Chris Lynch edited this page Jul 25, 2016 · 40 revisions

HPE OneView 2.00 Library

## New-HPOVServerProfileAssign

Unassign or Reassign an existing Server Profile. ### SYNTAX

New-HPOVServerProfileAssign [-ServerProfile] <Object> [-Server] <Object> [-ApplianceConnection] <Object> [<CommonParameters>]
New-HPOVServerProfileAssign [-ServerProfile] <Object>[ [-Unassigned] <SwitchParameter>] [-ApplianceConnection] <Object> [<CommonParameters>]
### Detailed Description

This Cmdlet is used to unassign or reassign an existing HPE OneView Server Profile. The destination Server and its Server Hardware Type does not need to match the original Server Hardware Type defined in the Server Profile. The Server Profile will be updated accordingly.

Parameters

-ApplianceConnection <Object>

Aliases [-Appliance]

Specify one HPOneView.Appliance.Connection object or Name property value. If Resource object is provided via Pipeline, the ApplianceConnection property of the object will be used.

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

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

-Server <Object>

The server hardware resource where the new profile is to be applied. This is normally retrieved with a 'Get-HPOVServer' call, and the Server state property should be "NoProfileApplied". Can also be the Server Hardware name.s

Aliases Appliance
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-ServerProfile <Object>

Aliases [-Profile] The name or object of the server profile resource to modify assignment.

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

-Unassigned <SwitchParameter>

Siwtch parameter to unassign a Server Profile.

Aliases Appliance
Required? false
Position? named
Default value False
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.Management.Automation.PSCustomObject

Server Profile resource object from Get-HPOVServerProfile.

### Return Values

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

If successful returns a task resource which may be polled to follow the progress of the profile creation. Otherwise, a request validation error will be returned.

### Examples

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

PS C:\> Get-HPOVServerProfile 'Profile 1' | New-HPOVServerProfileAssign -Server 'Encl1, Bay 10' | Wait-HPOVTaskComplete Get 'Profile 1' Server Profile and assign it to 'Encl1, Bay 10', then wait for the async task to complete. PS C:\> $BayID = 1 PS C:\> 1..10 | % { Get-HPOVServerProfile "Profile $_" | New-HPOVServerProfileAssign -Server "Encl1, Bay $BayID"; $BayID++ }

Get a number of Server Profiles and assign them to the sequential server devices.

 -------------------------- EXAMPLE 2 --------------------------

PS C:\> Get-HPOVServerProfile 'Profile 1' | New-HPOVServerProfileAssign -unassign | Wait-HPOVTaskComplete

Get 'Profile 1' Server Profile and unassign it, then wait for the async task to complete.

Related Links

Wiki Table of Contents

Clone this wiki locally