Skip to content

Connect HPOVMgmt

Chris Lynch edited this page Jan 3, 2018 · 49 revisions

HPE OneView 4.00 Library

Connect-HPOVMgmt

Initiate a connection to an HPE OneView appliance.

SYNTAX

Connect-HPOVMgmt [-Hostname] <String> [-UserName] <String> [-AuthLoginDomain] <String> [-Password] <Object>[ [-LoginAcknowledge] <SwitchParameter>] [<CommonParameters>]
Connect-HPOVMgmt [-Hostname] <String>[ [-Certificate] <Object>][ [-LoginAcknowledge] <SwitchParameter>] [<CommonParameters>]
Connect-HPOVMgmt [-Hostname] <String> [-Credential] <PSCredential> [-AuthLoginDomain] <String>[ [-LoginAcknowledge] <SwitchParameter>] [<CommonParameters>]

Detailed Description

Establish a connection with the specified HPE OneView appliance. Logs the user into the appliance and establishes a session for use with subsequent requests. Prompts will be displayed for any omitted values.

Appliance hostname or IP can include an alternate TCP port number. While the appliance does not allow the default TCP port 443 to be changed, the appliance could reside behind a firewall, which is redirecting an alternate TCP port number.

Parameters

-AuthLoginDomain <>

Aliases [-AuthProvider]

The Directory Name for LDAP/Active Directory authentication, or LOCAL for appliance internal user accounts.

Default is determined by connecting to the requested appliance and retrieving the default login directory. If not LOCAL, and you attempt to use an embedded user account, you must use -AuthLoginDomain parameter with the Local value..

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

-Certificate <>

Provide the X.509 certificate/SmartCard digital badge in order to authenticate to a supported appliance. Two-factor authentication must be configured on the appliance in order to provide a X.509 certificate.

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

-Credential <>

Use this parameter if you want to provide a PSCredential object instead.

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

-Hostname <>

Aliases [-Appliance, -Computername]

The hostname or IP address of the appliance.

Aliases Appliance, Computername
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-LoginAcknowledge <>

When a Login Message has been configured and acknowledgement is Required, use this parameter to acknowledge it during the initial call. Otherwise, if omitted, and a Login Banner acknowledgement is required, the caller will be prompted. This prompt does not support the -Confirm parameter.

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

-Password <>

Aliases [-p]

Password to log into the appliance. Can be either System.String or SecureString value..

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

-UserName <>

Aliases [-u, -user]

User name to authenticate.

Aliases u, user
Required? true
Position? named
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

None. You cannot pipe objects to this cmdlet.

Return Values

HPOneView.Appliance.Connection

When a valid connection is established with an appliance, this object is then added to ${Global:ConnectedSessions} connection tracker variable.

The object returned will contain the following public properties:

==============================================================================
| Name                   | Type       | Value                                |
|-----------------------------------------------------------------------------
| AuthLoginDomain        | String     | Local                                |
------------------------------------------------------------------------------
| ConnectionId           | Int        | 1                                    |
------------------------------------------------------------------------------
| Name                   | String     | Hostname value                       |
---------------------- -------------------------------------------------------
| SessionID              | String     | AUTH string returned from API        |
------------------------------------------------------------------------------
| ApplianceType          | String     | Indicate connected appliance type.   |
-------------------- ---------------------------------------------------------
| UserName               | String     | Username value                       |
------------------------------------------------------------------------------
| AuthType               | String     | Credential or Certificate/2FA        |
------------------------------------------------------------------------------
| ActivePermissions      | IList      | Collection of Scopes and permissions |
------------------------------------------------------------------------------
| ApplianceSecurityRoles | IList      | Collection of roles                  |
------------------------------------------------------------------------------
| Default                | Boolean    | Is connection default for library    |
------------------------------------------------------------------------------

System.Management.Automation.ErrorRecord

On error, appliance response is returned as a terminating error.

Examples

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

Connect-HPOVMgmt -appliance myappliance.domain.com ConnectionID Name UserName AuthLoginDomain ------------ ---- -------- --------------- 1 myappliance.domain.com Administrator LOCAL

Connect to a specific appliance FQDN. The user will be prompted for authentication provider, user name and password.

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

Connect-HPOVMgmt -appliance myappliance.domain.com:11223

Connect to a specific appliance, where the target TCP port isn't the default. The user will be prompted for authentication provider, user name and password.

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

$MySmartCard = gci Cert:\CurrentUser\my | ? { $_.EnhancedKeyUsageList.FriendlyName -match 'Smart Card Logon' } Connect-HPOVMgmt -appliance myappliance.domain.com -Certificate $MySmartCard

Connect to a specific appliance using a digital badge.

Related Links


HPE OneView 3.10 Library

Connect-HPOVMgmt

Initiate a connection to an HPE OneView appliance.

SYNTAX

Connect-HPOVMgmt [-Hostname] <String> [-UserName] <String> [-AuthLoginDomain] <String> [-Password] <Object>[ [-LoginAcknowledge] <SwitchParameter>] [<CommonParameters>]
Connect-HPOVMgmt [-Hostname] <String> [-Credential] <PSCredential> [-AuthLoginDomain] <String>[ [-LoginAcknowledge] <SwitchParameter>] [<CommonParameters>]

Detailed Description

Establish a connection with the specified HPE OneView appliance. Logs the user into the appliance and establishes a session for use with subsequent requests. Prompts will be displayed for any omitted values.

Appliance hostname or IP can include an alternate TCP port number. While the appliance does not allow the default TCP port 443 to be changed, the appliance could reside behind a firewall, which is redirecting an alternate TCP port number.

Parameters

-AuthLoginDomain <String>

Aliases [-AuthProvider]

The Directory Name for LDAP/Active Directory authentication, or LOCAL for appliance internal user accounts.

Default is determined by connecting to the requested appliance and retrieving the default login directory. If not LOCAL, and you attempt to use an embedded user account, you must use -AuthLoginDomain parameter with the Local value..

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

-Credential <PSCredential>

Use this parameter if you want to provide a PSCredential object instead.

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

-Hostname <String>

Aliases [-Appliance, -Computername]

The hostname or IP address of the appliance.

Aliases Appliance, Computername
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-LoginAcknowledge <SwitchParameter>

When a Login Message has been configured and acknowledgement is Required, use this parameter to acknowledge it during the initial call. Otherwise, if omitted, and a Login Banner acknowledgement is required, the caller will be prompted. This prompt does not support the -Confirm parameter.

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

-Password <Object>

Aliases [-p]

Password to log into the appliance. Can be either System.String or SecureString value..

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

-UserName <String>

Aliases [-u, -user]

User name to authenticate.

Aliases u, user
Required? true
Position? named
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

None. You cannot pipe objects to this cmdlet.

Return Values

HPOneView.Appliance.Connection

When a valid connection is established with an appliance, this object is then added to ${Global:ConnectedSessions} connection tracker variable.

The object returned will contain the following public properties:

==================================================================
| Name            | Type        | Value                          |
|-----------------------------------------------------------------
| AuthLoginDomain | String      | Local                          |
------------------------------------------------------------------
| ConnectionId    | Int         | 1                              |
------------------------------------------------------------------
| Name            | String      | Hostname value                 |
------------------------------------------------------------------
| SessionID       | String      | auth string returned from API  |
------------------------------------------------------------------
| SslChecked      | Bool        | Internal Library flag          |
------------------------------------------------------------------
| UserName        | String      | Username value                 |
------------------------------------------------------------------

System.Management.Automation.PSCustomObject

On error, appliance response is returned.

Examples

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

Connect-HPOVMgmt -appliance myappliance.domain.com ConnectionID Name UserName AuthLoginDomain ------------ ---- -------- --------------- 1 myappliance.domain.com Administrator LOCAL

Connect to a specific appliance FQDN. The user will be prompted for authentication provider, user name and password.

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

Connect-HPOVMgmt -appliance myappliance.domain.com:11223

Connect to a specific appliance, where the target TCP port isn't the default. The user will be prompted for authentication provider, user name and password.

Related Links


HPE OneView 3.00 Library

Connect-HPOVMgmt

Initiate a connection to an HPE OneView appliance.

SYNTAX

Connect-HPOVMgmt [-Hostname] <String> [-UserName] <String> [-AuthLoginDomain] <String> [-Password] <Object>[ [-LoginAcknowledge] <SwitchParameter>] [<CommonParameters>]
Connect-HPOVMgmt [-Hostname] <String> [-Credential] <PSCredential> [-AuthLoginDomain] <String>[ [-LoginAcknowledge] <SwitchParameter>] [<CommonParameters>]

Detailed Description

Establish a connection with the specified HPE OneView appliance. Logs the user into the appliance and establishes a session for use with subsequent requests. Prompts will be displayed for any omitted values.

Appliance hostname or IP can include an alternate TCP port number. While the appliance does not allow the default TCP port 443 to be changed, the appliance could reside behind a firewall, which is redirecting an alternate TCP port number.

Parameters

-AuthLoginDomain <String>

Aliases [-AuthProvider]

The Directory Name for LDAP/Active Directory authentication, or LOCAL for appliance internal user accounts.

Default is determined by connecting to the requested appliance and retrieving the default login directory. If not LOCAL, and you attempt to use an embedded user account, you must use -AuthLoginDomain parameter with the Local value..

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

-Credential <PSCredential>

Aliases [-PSCredential]

Use this parameter if you want to provide a PSCredential object instead.

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

-Hostname <String>

Aliases [-Appliance, -Computername]

The hostname or IP address of the appliance.

Aliases Appliance, Computername
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-LoginAcknowledge <SwitchParameter>

When a Login Message has been configured and acknowledgement is Required, use this parameter to acknowledge it during the initial call. Otherwise, if omitted, and a Login Banner acknowledgement is required, the caller will be prompted. This prompt does not support the -Confirm parameter.

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

-Password <Object>

Aliases [-p]

Password to log into the appliance. Can be either System.String or SecureString value..

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

-UserName <String>

Aliases [-u, -user]

User name to authenticate.

Aliases u, user
Required? true
Position? named
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

None. You cannot pipe objects to this cmdlet.

Return Values

HPOneView.Appliance.Connection

When a valid connection is established with an appliance, this object is then added to ${Global:ConnectedSessions} connection tracker variable.

The object returned will contain the following public properties:

==================================================================
| Name            | Type        | Value                          |
|-----------------------------------------------------------------
| AuthLoginDomain | String      | Local                          |
------------------------------------------------------------------
| ConnectionId    | Int         | 1                              |
------------------------------------------------------------------
| Name            | String      | Hostname value                 |
------------------------------------------------------------------
| SessionID       | String      | auth string returned from API  |
------------------------------------------------------------------
| SslChecked      | Bool        | Internal Library flag          |
------------------------------------------------------------------
| UserName        | String      | Username value                 |
------------------------------------------------------------------

System.Management.Automation.PSCustomObject

On error, appliance response is returned. Connection or API errors can be found in the global $ErrorResponseObject PSCustom object. It will contain an entry per connected appliance if an error was generated.

Examples

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

PS C:\> Connect-HPOVMgmt -appliance myappliance.domain.com ConnectionID Name UserName AuthLoginDomain ------------ ---- -------- --------------- 1 myappliance.domain.com Administrator LOCAL

Connect to a specific appliance FQDN. The user will be prompted for authentication provider, user name and password.

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

PS C:\> Connect-HPOVMgmt -appliance myappliance.domain.com:11223

Connect to a specific appliance, where the target TCP port isn't the default. The user will be prompted for authentication provider, user name and password.

Related Links


Wiki Table of Contents

Clone this wiki locally