< Back

Connect-HPEOSP

Tue Jan 14, 2020 1:46 am

NAME Connect-HPEOSP



SYNOPSIS

The Connect-HPEOSP cmdlet creates connections to iLO targets for OS Provisioning.





SYNTAX

Connect-HPEOSP [-IP] <String[]> [-Username] <String[]> [-Password] <String[]> [-DisableCertificateAuthentication

<SwitchParameter>] [-Timeout <Int32[]>] [<CommonParameters>]



Connect-HPEOSP [-IP] <String[]> -Credential <PSCredential[]> [-DisableCertificateAuthentication <SwitchParameter>]

[-Timeout <Int32[]>] [<CommonParameters>]





DESCRIPTION

The Connect-HPEOSP cmdlet creates connections to iLO targets. This cmdlets supports only on Gen10 servers. This

cmdlet has the following parameters.

???? IP - Holds the target iLO IP.

???? Username - Holds the target iLO username.

???? Password - Holds the target iLO password.

???? Credential - Holds the target PSCredentials.

???? Timeout - Holds the HTTPS protocol time out.

???? DisableCertificateAuthentication - Using this bypasses the server certificate authentication.





PARAMETERS

-IP <String[]>

Specifies iLO IP/Hostname to create a connection. IP can be either IPv4 or IPv6 address.



Aliases: Address, iLOIP, Host, Hostname, IPv6

ParameterSetName: (All)



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-Username <String[]>

Username to log onto the target. Must be entered with the password.



ParameterSetName: UsernamePasswordSessionSet



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Password <String[]>

Password to log onto the target. Must be entered with the username.



ParameterSetName: UsernamePasswordSessionSet



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DisableCertificateAuthentication [<SwitchParameter>]

If this switch parameter is present, the server certificate authentication is disabled while establishing the

iLO connection. If it is not present, server certificate authentication will execute according to the global

certificate authentication setting. The default behavior is to authenticate server certificates.



ParameterSetName: (All)



Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false



-Timeout [<Int32[]>]

Specifies the HTTPS protocol time out. The value is specified in seconds. Default value is 60.



ParameterSetName: (All)



Required? false

Position? named

Default value 60

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Credential <PSCredential[]>

Credential object based on the username and password used to log onto the target.



ParameterSetName: PSCredentialSessionSet



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String[]

System.Management.Automation.PSCredential[]

System.Int32[]







OUTPUTS

HPE.OSP.Connection[] or System.Management.Automation.PSObject[]

If the cmdlet executes successfully, it returns HPE.OSP.Connection[]. In case of error or warning, Status and

StatusInfo will be returned as PSObject.





NOTES





???? Hostname property of cmdlet output will always show DNS hostname if it is resolved. Otherwise it will be

empty.



EXAMPLE 1



PS C:\\> $connection = Connect-HPEOSP 10.20.30.1 admin admin123



PS C:\\> $connection





IP : 10.20.30.1

Hostname : abc1.domain.com

ConnectionType : Redfish

IsConnected : True

Username : admin

ProductName : ProLiant BL460c Gen10

ProcessorInfo : Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz

iLOGeneration : Integrated Lights-Out 5 (iLO 5)

iLOFirmwareVersion : 1.20

PortNumber : 443

DisableServerCertificateAuthenticationFlag : False

Location :

https://10.20.30.1/redfish/v1/SessionSe ... c52b020c5/

RootUri : https://10.20.30.1/redfish/v1/Sessions/

RootData : @{@odata.context=/redfish/v1/$metadata#ServiceRoot.ServiceRoot;

@odata.etag=W/"3BDF6AB9"; @odata.id=/redfish/v1/; @odata.type=#ServiceRoot.v1_1_0.ServiceRoot; Id=v1;

AccountService=; Chassis=; EventService=; JsonSchemas=; Links=; Managers=; Name=HPE RESTful Root Service; Oem=;

RedfishVersion=1.0.0; Registries=; SessionService=; Systems=; UUID=23d22b42-80d6-59a4-b31a-33555ba92b89;

UpdateService=}



This example shows the output of the Connect-HPEOSP cmdlet on a Gen10 server with username and password.

EXAMPLE 2



PS C:\\> $Cred = Get-Credential

cmdlet Get-Credential at command pipeline position 1

Supply values for the following parameters:



PS C:\\> $connection = Connect-HPEOSP -IP 10.20.30.1 -Credential $Cred -DisableCertificateAuthentication



PS C:\\> $connection





IP : 10.20.30.1

Hostname : abc1.domain.com

ConnectionType : Redfish

IsConnected : True

Username : admin

ProductName : ProLiant BL460c Gen10

ProcessorInfo : Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz

iLOGeneration : Integrated Lights-Out 5 (iLO 5)

iLOFirmwareVersion : 1.20

PortNumber : 443

DisableServerCertificateAuthenticationFlag : True

Location :

https://10.20.30.1/redfish/v1/SessionSe ... 79d2f1aa0/

RootUri : https://10.20.30.1/redfish/v1/Sessions/

RootData : @{@odata.context=/redfish/v1/$metadata#ServiceRoot.ServiceRoot;

@odata.etag=W/"3BDF6AB9"; @odata.id=/redfish/v1/; @odata.type=#ServiceRoot.v1_1_0.ServiceRoot; Id=v1;

AccountService=; Chassis=; EventService=; JsonSchemas=; Links=; Managers=; Name=HPE RESTful Root Service; Oem=;

RedfishVersion=1.0.0; Registries=; SessionService=; Systems=; UUID=23d22b42-80d6-59a4-b31a-33555ba92b89;

UpdateService=}



This example shows the output of the Connect-HPEOSP cmdlet on a Gen10 server with iLO IP and Credential.

EXAMPLE 3



PS C:\\> $pipelineInput = New-Object psobject



PS C:\\> $pipelineInput | Add-Member IP 10.20.30.1



PS C:\\> $pipelineInput | Add-Member Username admin



PS C:\\> $pipelineInput | Add-Member Password admin123



PS C:\\> $connection = $pipelineInput | Connect-HPEOSP ????????DisableCertificateAuthentication



PS C:\\> $connection





IP : 10.20.30.1

Hostname : abc1.domain.com

ConnectionType : Redfish

IsConnected : True

Username : admin

ProductName : ProLiant BL460c Gen10

ProcessorInfo : Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz

iLOGeneration : Integrated Lights-Out 5 (iLO 5)

iLOFirmwareVersion : 1.20

PortNumber : 443

DisableServerCertificateAuthenticationFlag : True

Location :

https://10.20.30.1/redfish/v1/SessionSe ... 4d89374bc/

RootUri : https://10.20.30.1/redfish/v1/Sessions/

RootData : @{@odata.context=/redfish/v1/$metadata#ServiceRoot.ServiceRoot;

@odata.etag=W/"59AAF706"; @odata.id=/redfish/v1/; @odata.type=#ServiceRoot.v1_1_0.ServiceRoot; Id=v1;

AccountService=; Chassis=; EventService=; JsonSchemas=; Links=; Managers=; Name=HPE RESTful Root Service; Oem=;

RedfishVersion=1.0.0; Registries=; SessionService=; Systems=; UUID=c0e6700d-fc0d-5e8a-9b49-0939c3d1b985;

UpdateService=}



This example shows the output of the Connect-HPEOSP cmdlet on a Gen10 server with username and password.

EXAMPLE 4



PS C:\\> $connection = Connect-HPEOSP -IP 10.20.30.1,10.20.30.3,10.20.30.5 -Username testuser1,testuser2,testuser3

-Password admin123,admin456,admin678



PS C:\\> $connection.Count

3



This example shows the output of the Connect-HPEOSP cmdlet with a list of target IP addresses with corresponding

username and password as named parameters.

EXAMPLE 5



PS C:\\> $connection = Connect-HPEOSP -IP 10.20.30.1,10.20.30.3,10.20.30.5 -Username testuser -Password admin123



PS C:\\> $connection.Count

3



This example shows the output of the Connect-HPEOSP cmdlet with a list of target IP addresses with single username

and password. The username and password are the same in all targeted IPs.

EXAMPLE 6



PS C:\\> $connection = Connect-HPEOSP

cmdlet Connect-HPEOSP at command pipeline position 1

Supply values for the following parameters:

IP[0]: 10.20.30.1

IP[1]: 10.20.30.2

IP[2]: 10.20.30.3

IP[3]:

Username[0]: admin1

Username[1]: admin2

Username[2]: admin3

Username[3]:

Password[0]: admin123

Password[1]: admin456

Password[2]: admin678

Password[3]:



PS C:\\> $connection.Count

3



This example shows the output of the Connect-HPEOSP cmdlet on Gen10 servers with interactive user inputs.

EXAMPLE 7



PS C:\\> $connection = Connect-HPEOSP

cmdlet Connect-HPEOSP at command pipeline position 1

Supply values for the following parameters:

IP[0]: 10.20.30.1

IP[1]: 10.20.30.2

IP[2]: 10.20.30.3

IP[3]:

Username[0]: admin

Username[1]:

Password[0]: admin123

Password[1]:



PS C:\\> $connection.Count

3



This example shows the output of the Connect-HPEOSP cmdlet on Gen10 servers with interactive user inputs. The

username and password are the same in all targeted IPs.

EXAMPLE 8



PS C:\\> $connection = Connect-HPEOSP -IP FE80::FE15:B4FF:FE97:1234 -Username admin -Password admin123

-DisableCertificateAuthentication



PS C:\\> $connection





IP : fe80::fe15:b4ff:fe97:1234

Hostname : abc1.domain.com

ConnectionType : Redfish

IsConnected : True

Username : admin

ProductName : ProLiant BL460c Gen10

ProcessorInfo : Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz

iLOGeneration : Integrated Lights-Out 5 (iLO 5)

iLOFirmwareVersion : 1.20

PortNumber : 443

DisableServerCertificateAuthenticationFlag : True

Location :

https://[fe80::fe15:b4ff:fe97:1234]/redfish/v1/SessionService/Sessions/admin000000005a162e63f16872b0/

RootUri : https://[fe80::fe15:b4ff:fe97:1234]/redfish/v1/Sessions/

RootData : @{@odata.context=/redfish/v1/$metadata#ServiceRoot.ServiceRoot;

@odata.etag=W/"3BDF6AB9"; @odata.id=/redfish/v1/; @odata.type=#ServiceRoot.v1_1_0.ServiceRoot; Id=v1;

AccountService=; Chassis=; EventService=; JsonSchemas=; Links=; Managers=; Name=HPE RESTful Root Service; Oem=;

RedfishVersion=1.0.0; Registries=; SessionService=; Systems=; UUID=23d22b42-80d6-59a4-b31a-33555ba92b89;

UpdateService=}



This example shows the output of the Connect-HPEOSP cmdlet on a Gen10 server with IPv6.

EXAMPLE 9



PS C:\\> $connection = Connect-HPEOSP -IP abc1.domain.com -Username admin -Password admin123

-DisableCertificateAuthentication



PS C:\\> $connection





IP : 10.20.30.1

Hostname : abc1.domain.com

ConnectionType : Redfish

IsConnected : True

Username : admin

ProductName : ProLiant BL460c Gen10

ProcessorInfo : Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz

iLOGeneration : Integrated Lights-Out 5 (iLO 5)

iLOFirmwareVersion : 1.20

PortNumber : 443

DisableServerCertificateAuthenticationFlag : True

Location :

https://10.20.30.1/redfish/v1/SessionSe ... b39581062/

RootUri : https://10.20.30.1/redfish/v1/Sessions/

RootData : @{@odata.context=/redfish/v1/$metadata#ServiceRoot.ServiceRoot;

@odata.etag=W/"3BDF6AB9"; @odata.id=/redfish/v1/; @odata.type=#ServiceRoot.v1_1_0.ServiceRoot; Id=v1;

AccountService=; Chassis=; EventService=; JsonSchemas=; Links=; Managers=; Name=HPE RESTful Root Service; Oem=;

RedfishVersion=1.0.0; Registries=; SessionService=; Systems=; UUID=23d22b42-80d6-59a4-b31a-33555ba92b89;

UpdateService=}



This example shows the output of the Connect-HPEOSP cmdlet on a Gen10 server with Hostname.

EXAMPLE 10



PS C:\\> $connection = Connect-HPEOSP -IP 10.20.30.1:1234 -Username admin -Password admin123

-DisableCertificateAuthentication



PS C:\\> $connection





IP : 10.20.30.1

Hostname : abc1.domain.com

ConnectionType : Redfish

IsConnected : True

Username : admin

ProductName : ProLiant BL460c Gen10

ProcessorInfo : Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz

iLOGeneration : Integrated Lights-Out 5 (iLO 5)

iLOFirmwareVersion : 1.20

PortNumber : 1234

DisableServerCertificateAuthenticationFlag : True

Location :

https://10.20.30.1:1234/redfish/v1/Sess ... b39581062/

RootUri : https://10.20.30.1:1234/redfish/v1/Sessions/

RootData : @{@odata.context=/redfish/v1/$metadata#ServiceRoot.ServiceRoot;

@odata.etag=W/"3BDF6AB9"; @odata.id=/redfish/v1/; @odata.type=#ServiceRoot.v1_1_0.ServiceRoot; Id=v1;

AccountService=; Chassis=; EventService=; JsonSchemas=; Links=; Managers=; Name=HPE RESTful Root Service; Oem=;

RedfishVersion=1.0.0; Registries=; SessionService=; Systems=; UUID=23d22b42-80d6-59a4-b31a-33555ba92b89;

UpdateService=}



This example shows the output of the Connect-HPEOSP cmdlet on a Gen10 server with IP and Port number.



RELATED LINKS

http://www.hpe.com/servers/powershell

Disconnect-HPEOSP

Test-HPEOSPConnection