Skip to content

Connect HPOVMgmt

Chris Lynch edited this page Apr 18, 2017 · 49 revisions

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


HPE OneView 2.00 Library

Connect-HPOVMgmt

Initiate a connection to an HPE OneView appliance.

SYNTAX

Connect-HPOVMgmt [-Hostname] <String> [-UserName] <String> [-Password] <String> [-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 examinig registry at HKCU\Software\Hewlett-Packard\HPOneView, and if a valid REG_SZ property of 'AuthProvider#{Hostname' exists This REG property is configured when Set-HPOVLDAPDefaultDirectory is used. Otherwise, 'LOCAL'.

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

-Hostname <String>

Aliases [-appliance]

The hostname or IP address of the appliance. When attempting to use an IPv6 Address, it must be encapsulated with the left backet '[' and the right backet ']'. Example: [fde4:8dba:82e1::1]

Aliases Appliance
Required? true
Position? 0
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 <String>

Aliases [-p]

Password to log into the appliance.

Aliases p
Required? true
Position? 2
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? 1
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 --------------------------

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

Connect to a specific appliance FQDN.

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

PS C:\> Connect-HPOVMgmt -Hostname myappliance.domain.com:11223 -Username Administrator -Password MyPassword

Connect to a specific appliance, where the target TCP port isn't the default.

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

PS C:\> $MyPassword = Read-Host 'Password' -AsSecureString -Force PS C:\> Connect-HPOVMgmt -Hostname myappliance.domain.com -Username Administrator -Password $MyPassword ConnectionID Name UserName AuthLoginDomain ------------ ---- -------- --------------- 1 myappliance.domain.com Administrator LOCAL

Connect to a specific appliance FQDN, providing a SecureString object for the -Password parameter.

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

PS C:\> Connect-HPOVMgmt -Hostname [fde4:8dba:82e1::1] -Username Administrator -Password MyPassword ConnectionID Name UserName AuthLoginDomain Default Connection ------------ ---- -------- --------------- ------------------ 1 [fde4:8dba:82e1::1] Administrator LOCAL True

Connect to a specific appliance, using it's IPv6 Address (DHCPv6 or Static).

Related Links


HPE OneView 1.20 Library

Connect-HPOVMgmt

Initiate a connection to an HP OneView appliance.

SYNTAX

Connect-HPOVMgmt [-appliance] <appliance>[ [-authProvider] <authProvider>] [-User] <User>[ [-password] <password>] [<CommonParameters>]

Detailed Description

Establish a connection with the specified HP 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

-appliance <appliance>

The hostname or IP address of the appliance.

Aliases None.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters?    false

-authProvider <authProvider>

The Directory Name for LDAP/Active Directory authentication, or LOCAL for appliance internal user accounts. The Directory Name does not need to match the Active Directory or LDAP Authentication Realm name. It is the Authentication Directory Display Name configured on the HP OneView Appliance.

Default is LOCAL.

Aliases None.
Required? false
Position? 4
Default value LOCAL
Accept pipeline input? false
Accept wildcard characters?    false

-User <User>

Aliases [-u] User name to authenticate.

Aliases None.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters?    false

-password <password>

Aliases [-p] Password to log into the appliance.

Aliases None.
Required? false
Position? 3
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

None.

On successful auth, command prompt will display [username]@[appliance]. If console prompt is disabled via the Set-HPOVPrompt cmdlet, Show-HPOVAppliance can be used.

System.Management.Automation.PSCustomObject

On error, appliance response is returned.

Examples

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

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

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.

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

PS C:\> Connect-HPOVMgmt -Appliance myappliance.domain.com -Username [email protected] -Password MyPassword -AuthProvider MyDomain Connect to a specific appliance, using an Authentication Directory User Account.

Note: MyDomain is the Display Name of the Authentication Directory configured on the appliance, and does not necessarily match the Active Directory or LDAP Authentication Realm name.

Related Links


Wiki Table of Contents

Clone this wiki locally