Library Version 1.10

Library Version 1.06


HP OneView 1.10 Library

NAME

New-HPOVProfile

SYNOPSIS

Create or Import a Server Profile

SYNTAX

New-HPOVProfile [-name] <string>[[-server] <Object>] [[-description] <String>] [[-connections] <Array>] [[-enclosureGroup] <Object>] [[-serverHardwareType] <Object>] [-firmware] [-baseline <Object>] [-bios] [-biosSettings <Array>] [-boot] [-bootOrder <Array>] [-localstorage] [-Initialize] [-Bootable] [-RaidLevel <String>] [-Affinity <String>] [-macAssignment <String>] [-wwnAssignment <String>] [-snAssignment <String>] [<CommonParameters>]

New-HPOVProfile [-name] <string>[[-server] <Object>] [[-description] <String>] [[-connections] <Array>] [[-enclosureGroup] <Object>] [[-serverHardwareType] <Object>] [-firmware] [-baseline <Object>] [-bios] [-biosSettings <Array>] [-boot] [-bootOrder <Array>] [-localstorage] [-Initialize] [-Bootable] [-RaidLevel <String>] -SANStorage -HostOStype <String> -StorageVolume <Object> [-EvenPathDisabled] [-OddPathDisabled] [-Affinity <String>] [-macAssignment <String>] [-wwnAssignment <String>] [-snAssignment <String>] [<CommonParameters>]

New-HPOVProfile -Import -ProfileObj <Object> [<CommonParameters>]

DESCRIPTION

This cmdlet is used to create or import an HP OneView Server Profile.

PARAMETERS

-name <String>
The name of the server profile resource to be created.
Aliases None
Required? true
Position? 1
Default value <none>         
Accept pipeline input? false
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 or URI.
Aliases None
Required? false
Position? 2
Default value Unassigned   
Accept pipeline input? false
Accept wildcard characters?    false
-description <String>
Optional description for this server profile.
Aliases None
Required? false
Position? 3
Default value <none>        
Accept pipeline input? false
Accept wildcard characters?    false
-connections <Array>
The network connections that are to be part of this new server profile. This an array of profile connection objects which may be created with New-HPOVProfileConnection.
Aliases None           
Required? false
Position? 4
Default value @()
Accept pipeline input? false
Accept wildcard characters?    false
-enclosureGroup <Object>
The Enclosure Group resource the Server Profile will be bound to. Only required when Server value is "Unassigned".
Aliases EG
Required? false
Position? 5
Default value <none>        
Accept pipeline input? false
Accept wildcard characters?    false
-serverHardwareType <Object>
The Server Hardware Type resource the Server Profile will be bound to. Only required when Server value is "Unassigned".
Aliases SHT
Required? false
Position? 6
Default value <none>        
Accept pipeline input? false
Accept wildcard characters?    false
-firmware <Boolean>
Boolean value to enable Firmware Management.
Aliases None
Required? false
Position? 7
Default value False          
Accept pipeline input? false
Accept wildcard characters?    false
-baseline <String>
Firmware baseline to assign. Can be either Baseline Name or URI.
Aliases None
Required? false
Position? 8
Default value <none>       
Accept pipeline input? false
Accept wildcard characters?    false
-bios <Boolean>
Boolean value to enable BIOS Settings Management.
Aliases None          
Required? false
Position? 9
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-biosSettings <Array>
BIOS Settings that are to be managed. You can get the BIOS settings available from Get-HPOVServerHarwareType and the returned biosSettings property.
Aliases None
Required? false
Position? 10
Default value @()
Accept pipeline input? false             
Accept wildcard characters?    false
-boot <Boolean>
Boolean value to enable Boot Order Management. Also required for connection boot enablement. If this is disabled, then PXE or FC BfS settings are disabled within the entire Server Profile.
Aliases None           
Required? false
Position? 11
Default value True
Accept pipeline input? false
Accept wildcard characters?    false
-bootOrder <Array>
Boot Order settings to be managed. Must be an array with the following values:
  • PXE
  • HardDisk
  • CD
  • Floppy
  • USB
Aliases None
Required? false
Position? 12
Default value @(‘CD’,’Floppy’,’USB’,’HardDisk’,’PXE’)
Accept pipeline input? false
Accept wildcard characters?    false
-LocalStorage [<SwitchParameter>]
Local storage settings to be configured on the server.
Aliases None
Required? false
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-Initialize [<SwitchParameter>]
Indicates whether the local storage controller should be reset to factory defaults before applying the local storage settings from the server profile.

******************
***WARNING***
******************

Setting this will overwrite an existing logical disk if present, and without further warning.

******************
***WARNING***
******************

Aliases None
Required? false
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-Bootable [<SwitchParameter>]
Indicates if the logical drive is bootable or not.
Aliases None
Required? false
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-RaidLevel <String>
RAID level of the logical drive. Local Smart Array controller must support the required RAID level with the appropriate amount of drives.
Aliases None
Required? false
Position? Named
Default value None.         
Accept pipeline input? false
Accept wildcard characters?    false
-SANStorage [<SwitchParameter>]
Optional. Switch to enable SAN Storage Management within the Server Profile.
Aliases None
Required? true
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-HostOSType <String>
Alias [-OS]
Optional. Specify the Host OS type, which will set the Host OS value when HP OneView created the Host object on the Storage System. Accepted values:
  • CitrixXen = "Citrix Xen Server 5.x/6.x"
  • AIX = "AIX"
  • IBMVIO = "IBM VIO Server"
  • RHEL4 = "RHE Linux (Pre RHEL 5)"
  • RHEL3 = "RHE Linux (Pre RHEL 5)"
  • RHEL = "RHE Linux (5.x, 6.x)”
  • RHEV = "RHE Virtualization (5.x, 6.x)"
  • VMware = "ESX 4.x/5.x"
  • Win2k3 = "Windows 2003"
  • Win2k8 = "Windows 2008/2008 R2"
  • Win2k12 = "Windows 2012 / WS2012 R2"
  • OpenVMS = "OpenVMS"
  • Egenera = "Egenera"
  • Exanet = "Exanet"
  • Solaris9 = "Solaris 9/10"
  • Solaris10 = "Solaris 9/10"
  • Solaris11 = "Solaris 11"
  • ONTAP = "NetApp/ONTAP"
  • OEL = "OE Linux UEK (5.x, 6.x)"
  • HPUX11iv1 = "HP-UX (11i v1, 11i v2)"
  • HPUX11iv2 = "HP-UX (11i v1, 11i v2)"
  • HPUX11iv3 = "HP-UX (11i v3)"
  • SUSE = "SuSE (10.x, 11.x)"
  • SUSE9 = "SuSE Linux (Pre SLES 10)"
  • Inform = "InForm"
Aliases -OS
Required? false
Position? Named
Default value None.         
Accept pipeline input? false
Accept wildcard characters?    false
-StorageVolume <Object>
Optional. Array of Storage Volume resources to attach. Can be created by using the New-HPOVProfileAttachVolume cmdlet. This parameter does not accept a Storage Volume resource from the Get-HPOVStorageVolume cmdlet.

The format of the Storage Volume resource should be a PsCustomObject PowerShell resource with the following keys and values:

[PsCustomObject]@{
    [System.Int]id - Valid Host LUN ID 0-254
    [System.String]lunType - Auto or Manual
    [System.String]volumeUri - URI to Storage Volume that has been created and
                               not assigned to another Server Profile if it is
                               a Private Volume.
    [System.String]volumeStoragePoolUri - URI to HP OneView managed Storage 
                                          Pool
    [System.String]volumeStorageSystemUri - URI to HP OneView managed Storage
                                            System
    [System.Array]storagePaths - Array specifying the Profile FC Connection
                                 ID associated with the path to the attached
                                 volume, and if the path is enabled or
                                 disabled.
        @(
            [System.Int]connectionId - FC Connection ID.  If using New-
                                       HPOVProfileAttachVolume helper cmdlet,
                                       New-HPOVProfile will automatically
                                       determine the FC connection ID.
            [System.Boolean]isEnabled - Enable or disable the path
        )
}

Aliases None
Required? false
Position? 13
Default value Virtual         
Accept pipeline input? false
Accept wildcard characters?    false
-EvenPathDisabled [<SwitchParameter>]
Alias [-even]
Optional. Disable the Even Paths for attached volumes.
Aliases Even
Required? false
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-OddPathDisabled [<SwitchParameter>]
Alias [-odd]
Optional. Disable the Odd Paths for attached volumes.
Aliases Odd
Required? false
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-Affinity <String>
In a server profile, the Affinity control sets the remove-and-replace behavior for blade servers. If you apply a server profile to a blade server and the server is subsequently removed from the device bay, the Affinity setting controls whether the server profile is reapplied when you insert a server blade into the empty bay. Server profiles for rack servers do not have affinity.
Accepted values:
  • DeviceBay - The server profile you assign to the (empty) device bay is applied to any server blade you insert into the bay, provided the server hardware type of the inserted server blade matches the server hardware type specified in the server profile.
  • DeviceBay+SH - The server profile you assign to the (empty) device bay is not applied if you insert a different server into the bay. The serial number and server hardware type of the inserted server blade must match the values in the server profile. Affinity between the server profile and the server hardware is established one of the following conditions is met:
    • The server profile is assigned to server hardware in a device bay
    • The server profile is assigned to an empty device bay and you subsequently insert a server blade with a matching server hardware type into the bay.
    Editing a server profile resets its server hardware affinity. If you assign the server profile to a populated device bay, the server hardware in the bay becomes associated with the profile. If the server profile is unassigned or assigned to an empty device bay, any current association is cleared.
Aliases None
Required? false
Position? Named
Default value DeviceBay         
Accept pipeline input? false
Accept wildcard characters?    false
-macAssignment <String>
Optional setting for MAC address assignment. May be Virtual or Physical.
Aliases None
Required? false
Position? 13
Default value Virtual         
Accept pipeline input? false
Accept wildcard characters?    false
-wwnAssignment <String>
Optional setting for WWN assignment. May be Virtual or Physical.
Aliases None
Required? false
Position? 14
Default value Virtual        
Accept pipeline input? false
Accept wildcard characters?    false
-snAssignment <String>
Optional setting for serial number & UUID assignment. May be Virtual or Physical.
Aliases None
Required? false
Position? 15
Default value Virtual        
Accept pipeline input? false
Accept wildcard characters?    false              
-Import <String>
Switch to import Server Profile JSON object or file.
Aliases None
Required? true
Position? named
Default value False             
Accept pipeline input? false
Accept wildcard characters?    false
-ProfileObj <Object>
Source Server Profile JSON object or file.
Aliases location, file
Required? true
Position? named
Default value <None>        
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).

INPUTS

System.String
System.Management.Automation.PSCustomObject

Accepts the full path to the Server Profile JSON export, or the entire Server Profile resource object from Get-Content.

OUTPUTS

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.

RELATED LINKS

EXAMPLES

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

PS C:\> $svr = Get-HPOVServer "ServerA"
PS C:\> $task = New-HPOVProfile -name "Profile 1" -server $svr
PS C:\> Wait-HPOVTaskComplete $task.uri
Create a simple profile for 'ServerA'

 

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

PS C:\> $profileName = "Server Profile Template"
PS C:\> $net41 = Get-HPOVNetwork "Net-41"
PS C:\> $con41 = New-HPOVProfileConnection -network $net41 -connectionId 1
PS C:\> $net42 = Get-HPOVNetwork "Net-42"
PS C:\> $con42 = New-HPOVProfileConnection -network $net42 -connectionId 2
PS C:\> $conList = @($con41, $con42)
PS C:\> $task = New-HPOVProfile -name $profileName -server "unassigned" -serverHardwareType "bl460 Gen8 1" -enclosureGroup "Production Encl Grp1" -connections $conList
PS C:\> Wait-HPOVTaskComplete -taskUri $task.uri
Create a profile which includes networks 'Net-41' and 'Net-42'

 

-------------------------- EXAMPLE 3 --------------------------

PS C:\> $profileName = "Server Profile Template"
PS C:\> $bl460SHT = Get-HPOVServerHardwareTypes -name "BL460 Gen8 1"
PS C:\> $enclosuregroup = Get-HPOVEnclosureGroup "Production EG1"
PS C:\> $net41 = Get-HPOVNetwork "Net-41"
PS C:\> $con41 = New-HPOVProfileConnection -id 1 -type Ethernet -network $net41
PS C:\> $net42 = Get-HPOVNetwork "Net-42"
PS C:\> $con42 = New-HPOVProfileConnection -id 2 -type Ethernet -network $net42
PS C:\> $fcneta = Get-HPOVNetwork "fabric a"
PS C:\> $con3 = New-HPOVProfileConnection -id 3 -type FibreChannel -network $fcneta -bootable -priority Primary -arrayWWPn "21:11:00:02:AC:00:72:03" -LUN 0
PS C:\> $fcnetb = Get-HPOVNetwork "fabric b"
PS C:\> $con4 = New-HPOVProfileConnection -id 4 -type FibreChannel -network $fcnetb -bootable -priority Secondary -arrayWWPn "22:12:00:02:AC:00:72:03" -LUN 0
PS C:\> $conList = @($con41, $con42, $fcneta, $fcnetb)
PS C:\> $task = New-HPOVProfile -name $profileName -server 'unassigned' -connections $conList -sht $sht -eg $enclosuregroup
PS C:\> Wait-HPOVTaskComplete -taskUri $task.uri
Create a profile which includes networks 'Net-41' and 'Net-42', adds FC Connections for BfS.

 

-------------------------- EXAMPLE 4 --------------------------

PS C:\> $profileName = "Server Profile Template"
PS C:\> $bl460SHT = Get-HPOVServerHardwareTypes -name "BL460 Gen8 1"
PS C:\> $enclosuregroup = Get-HPOVEnclosureGroup "Production EG1"
PS C:\> $net41 = Get-HPOVNetwork "Net-41"
PS C:\> $con41 = New-HPOVProfileConnection -id 1 -type Ethernet -network $net41
PS C:\> $net42 = Get-HPOVNetwork "Net-42"
PS C:\> $con42 = New-HPOVProfileConnection -id 2 -type Ethernet -network $net42
PS C:\> $fcneta = Get-HPOVNetwork "fabric a"
PS C:\> $con3 = New-HPOVProfileConnection -id 3 -type FibreChannel -network $fcneta
PS C:\> $fcnetb = Get-HPOVNetwork "fabric b"
PS C:\> $con4 = New-HPOVProfileConnection -id 4 -type FibreChannel -network $fcnetb
PS C:\> $conList = @($con41, $con42, $fcneta, $fcnetb)
PS C:\> $volume1 = Get-HPOVStorageVolume Volume1 | New-HPOVProfileAttachVolume -volumeid 1
PS C:\> $volume2 = Get-HPOVStorageVolume SharedVolume1 | New-HPOVProfileAttachVolume -volumeid 2
PS C:\> $attachVolumes = @($volume1,$volume2)
PS C:\> $task = New-HPOVProfile -name $profileName -server 'unassigned' -connections $conList -SANStorage -ostype VMware -StorageVolume $attachVolumes -sht $sht -eg $enclosuregroup
PS C:\> Wait-HPOVTaskComplete -taskUri $task.uri
Create a profile which includes networks 'Net-41' and 'Net-42', and attach two storage volumes.

 

-------------------------- EXAMPLE 5 --------------------------

PS C:\> $profileName = "Server Profile Template"
PS C:\> $bl460SHT = Get-HPOVServerHardwareTypes -name "BL460 Gen8 1"
PS C:\> #display the BL460 Gen8 BIOS Settings
PS C:\> $bl460SHT.biosSettings
PS C:\> #Set HP Power Profile (ID 210) to Maximum Performance and HP Power Regulator (ID 140) to HP Static High Performance Mode.
PS C:\> $bl460bios = @(@{id=210;value=3},@{id=140;value=3})
PS C:\> $net41 = Get-HPOVNetwork "Net-41"
PS C:\> $con41 = New-HPOVProfileConnection 1 Ethernet $net41
PS C:\> $net42 = Get-HPOVNetwork "Net-42"
PS C:\> $con42 = New-HPOVProfileConnection -connectionID 2 -connectionType Ethernet -network $net42
PS C:\> $conList = @($con41, $con42)
PS C:\> $task = New-HPOVProfile -name $profileName -server $server -connections $conList -boot -bootorder @("PXE","HardDisk","CD","Floppy","USB") -bios -biossettings $bl460bios
PS C:\> Wait-HPOVTaskComplete -taskUri $task.uri
Create a profile which includes networks 'Net-41' and 'Net-42', sets the boot order, and sets the BIOS.

 

-------------------------- EXAMPLE 6 --------------------------

PS C:\> New-HPOVProfile -import -file C:\profiles\ServerProfile1.json

Basic Server Profile import.

 

-------------------------- EXAMPLE 7 --------------------------

PS C:\> (Get-Content C:\profiles\ServerProfile1.json) -join "`n" | New-HPOVProfile -import

Read the contents from ServerProfile1.json, join each line into a single object, and pipe to New-HPOVProfile to import.

 

-------------------------- EXAMPLE 8 --------------------------

PS C:\> $jsonProfiles = Get-ChildItem C:\profiles\*.json
PS C:\> $jsonProfiles | foreach-object { New-HPOVProfile -import -file $_.fullname }
Retrieve list of all JSON files in C:\profiles, then pass each file and its full path to New-HPOVProfile

HP OneView 1.06 Library

NAME

New-HPOVProfile

SYNOPSIS

Create or Import a Server Profile

SYNTAX

New-HPOVProfile [-name] <string>[[-server] <Object>] [[-description] <String>] [[-connections] <Array>] [[-enclosureGroup] <Object>] [[-serverHardwareType] <Object>] [-firmware] [-baseline <Object>] [-bios] [-biosSettings <Array>] [-boot] [-bootOrder <Array>] [-localstorage] [-Initialize] [-Bootable] [-RaidLevel <String>] [-Affinity <String>] [-macAssignment <String>] [-wwnAssignment <String>] [-snAssignment <String>] [<CommonParameters>]

New-HPOVProfile -Import -ProfileObj <Object> [<CommonParameters>]

DESCRIPTION

This cmdlet is used to create or import an HP OneView Server Profile.

PARAMETERS

-name <String>
The name of the server profile resource to be created.
Aliases None
Required? true
Position? 1
Default value <none>         
Accept pipeline input? false
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 or URI.
Aliases None
Required? false
Position? 2
Default value Unassigned   
Accept pipeline input? false
Accept wildcard characters?    false
-description <String>
Optional description for this server profile.
Aliases None
Required? false
Position? 3
Default value <none>        
Accept pipeline input? false
Accept wildcard characters?    false
-connections <Array>
The network connections that are to be part of this new server profile. This an array of profile connection objects which may be created with New-HPOVProfileConnection.
Aliases None           
Required? false
Position? 4
Default value @()
Accept pipeline input? false
Accept wildcard characters?    false
-enclosureGroup <Object>
The Enclosure Group resource the Server Profile will be bound to. Only required when Server value is "Unassigned".
Aliases EG
Required? false
Position? 5
Default value <none>        
Accept pipeline input? false
Accept wildcard characters?    false
-serverHardwareType <Object>
The Server Hardware Type resource the Server Profile will be bound to. Only required when Server value is "Unassigned".
Aliases SHT
Required? false
Position? 6
Default value <none>        
Accept pipeline input? false
Accept wildcard characters?    false
-firmware <Boolean>
Boolean value to enable Firmware Management.
Aliases None
Required? false
Position? 7
Default value False          
Accept pipeline input? false
Accept wildcard characters?    false
-baseline <String>
Firmware baseline to assign. Can be either Baseline Name or URI.
Aliases None
Required? false
Position? 8
Default value <none>       
Accept pipeline input? false
Accept wildcard characters?    false
-bios <Boolean>
Boolean value to enable BIOS Settings Management.
Aliases None          
Required? false
Position? 9
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-biosSettings <Array>
BIOS Settings that are to be managed. You can get the BIOS settings available from Get-HPOVServerHarwareType and the returned biosSettings property.
Aliases None
Required? false
Position? 10
Default value @()
Accept pipeline input? false             
Accept wildcard characters?    false
-boot <Boolean>
Boolean value to enable Boot Order Management. Also required for connection boot enablement. If this is disabled, then PXE or FC BfS settings are disabled within the entire Server Profile.
Aliases None           
Required? false
Position? 11
Default value True
Accept pipeline input? false
Accept wildcard characters?    false
-bootOrder <Array>
Boot Order settings to be managed. Must be an array with the following values:
  • PXE
  • HardDisk
  • CD
  • Floppy
  • USB
Aliases None
Required? false
Position? 12
Default value @(‘CD’,’Floppy’,’USB’,’HardDisk’,’PXE’)
Accept pipeline input? false
Accept wildcard characters?    false
-LocalStorage [<SwitchParameter>]
Local storage settings to be configured on the server.
Aliases None
Required? false
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-Initialize [<SwitchParameter>]
Indicates whether the local storage controller should be reset to factory defaults before applying the local storage settings from the server profile.

******************
***WARNING***
******************

Setting this will overwrite an existing logical disk if present, and without further warning.

******************
***WARNING***
******************

Aliases None
Required? false
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-Bootable [<SwitchParameter>]
Indicates if the logical drive is bootable or not.
Aliases None
Required? false
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters?    false
-RaidLevel <String>
RAID level of the logical drive. Local Smart Array controller must support the required RAID level with the appropriate amount of drives.
Aliases None
Required? false
Position? Named
Default value None.         
Accept pipeline input? false
Accept wildcard characters?    false
-macAssignment <String>
Optional setting for MAC address assignment. May be Virtual or Physical.
Aliases None
Required? false
Position? 13
Default value Virtual         
Accept pipeline input? false
Accept wildcard characters?    false
-wwnAssignment <String>
Optional setting for WWN assignment. May be Virtual or Physical.
Aliases None
Required? false
Position? 14
Default value Virtual        
Accept pipeline input? false
Accept wildcard characters?    false
-snAssignment <String>
Optional setting for serial number & UUID assignment. May be Virtual or Physical.
Aliases None
Required? false
Position? 15
Default value Virtual        
Accept pipeline input? false
Accept wildcard characters?    false              
-Import <String>
Switch to import Server Profile JSON object or file.
Aliases None
Required? true
Position? named
Default value False             
Accept pipeline input? false
Accept wildcard characters?    false
-ProfileObj <Object>
Source Server Profile JSON object or file.
Aliases location, file
Required? true
Position? named
Default value <None>        
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).

INPUTS

System.String
System.Management.Automation.PSCustomObject

 

Accepts the full path to the Server Profile JSON export, or the entire Server Profile resource object from Get-Content.

 

OUTPUTS

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.

RELATED LINKS

EXAMPLES

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

PS C:\> $svr = Get-HPOVServer "ServerA"
PS C:\> $task = New-HPOVProfile -name "Profile 1" -server $svr
PS C:\> Wait-HPOVTaskComplete $task.uri
Create a simple profile for 'ServerA'

 

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

PS C:\> $profileName = "Server Profile Template"
PS C:\> $net41 = Get-HPOVNetwork "Net-41"
PS C:\> $con41 = New-HPOVProfileConnection -network $net41 -connectionId 1
PS C:\> $net42 = Get-HPOVNetwork "Net-42"
PS C:\> $con42 = New-HPOVProfileConnection -network $net42 -connectionId 2
PS C:\> $conList = @($con41, $con42)
PS C:\> $task = New-HPOVProfile -name $profileName -server "unassigned" -serverHardwareType "bl460 Gen8 1" -enclosureGroup "Production Encl Grp1" -connections $conList
PS C:\> Wait-HPOVTaskComplete -taskUri $task.uri
Create a profile which includes networks 'Net-41' and 'Net-42'

 

-------------------------- EXAMPLE 3 --------------------------

PS C:\> $profileName = "Server Profile Template"
PS C:\> $bl460SHT = Get-HPOVServerHardwareTypes -name "BL460 Gen8 1"
PS C:\> $enclosuregroup = Get-HPOVEnclosureGroup "Production EG1"
PS C:\> $net41 = Get-HPOVNetwork "Net-41"
PS C:\> $con41 = New-HPOVProfileConnection -id 1 -type Ethernet -network $net41
PS C:\> $net42 = Get-HPOVNetwork "Net-42"
PS C:\> $con42 = New-HPOVProfileConnection -id 2 -type Ethernet -network $net42
PS C:\> $fcneta = Get-HPOVNetwork "fabric a"
PS C:\> $con3 = New-HPOVProfileConnection -id 3 -type FibreChannel -network $fcneta -bootable -priority Primary -arrayWWPn "21:11:00:02:AC:00:72:03" -LUN 0
PS C:\> $fcnetb = Get-HPOVNetwork "fabric b"
PS C:\> $con4 = New-HPOVProfileConnection -id 4 -type FibreChannel -network $fcnetb -bootable -priority Secondary -arrayWWPn "22:12:00:02:AC:00:72:03" -LUN 0
PS C:\> $conList = @($con41, $con42, $fcneta, $fcnetb)
PS C:\> $task = New-HPOVProfile -name $profileName -server 'unassigned' -connections $conList -sht $sht -eg $enclosuregroup
PS C:\> Wait-HPOVTaskComplete -taskUri $task.uri
Create a profile which includes networks 'Net-41' and 'Net-42', adds FC Connections for BfS.

 

-------------------------- EXAMPLE 4 --------------------------

PS C:\> $profileName = "Server Profile Template"
PS C:\> $bl460SHT = Get-HPOVServerHardwareTypes -name "BL460 Gen8 1"
PS C:\> #display the BL460 Gen8 BIOS Settings
PS C:\> $bl460SHT.biosSettings
PS C:\> #Set HP Power Profile (ID 210) to Maximum Performance and HP Power Regulator (ID 140) to HP Static High Performance Mode.
PS C:\> $bl460bios = @(@{id=210;value=3},@{id=140;value=3})
PS C:\> $net41 = Get-HPOVNetwork "Net-41"
PS C:\> $con41 = New-HPOVProfileConnection 1 Ethernet $net41
PS C:\> $net42 = Get-HPOVNetwork "Net-42"
PS C:\> $con42 = New-HPOVProfileConnection -connectionID 2 -connectionType Ethernet -network $net42
PS C:\> $conList = @($con41, $con42)
PS C:\> $task = New-HPOVProfile -name $profileName -server $server -connections $conList -boot -bootorder @("PXE","HardDisk","CD","Floppy","USB") -bios -biossettings $bl460bios
PS C:\> Wait-HPOVTaskComplete -taskUri $task.uri
Create a profile which includes networks 'Net-41' and 'Net-42', sets the boot order, and sets the BIOS.

 

-------------------------- EXAMPLE 5 --------------------------

PS C:\> New-HPOVProfile -import -file C:\profiles\ServerProfile1.json

Basic Server Profile import.

 

-------------------------- EXAMPLE 6 --------------------------

PS C:\> (Get-Content C:\profiles\ServerProfile1.json) -join "`n" | New-HPOVProfile -import

Read the contents from ServerProfile1.json, join each line into a single object, and pipe to New-HPOVProfile to import.

 

-------------------------- EXAMPLE 7 --------------------------

PS C:\> $jsonProfiles = Get-ChildItem C:\profiles\*.json
PS C:\> $jsonProfiles | foreach-object { New-HPOVProfile -import -file $_.fullname }
Retrieve list of all JSON files in C:\profiles, then pass each file and its full path to New-HPOVProfile

Last edited Aug 19, 2014 at 12:21 AM by chrislynchhp, version 33