Documentation Index
Fetch the complete documentation index at: https://mintlify.com/HewlettPackard/POSH-HPEOneView/llms.txt
Use this file to discover all available pages before exploring further.
Synopsis
Authenticate and connect to an HPE OneView appliance, adding the resulting session to the$ConnectedSessions global tracker.
Syntax
PSCredential (default)
Username / Password
Certificate (2FA / Smart Card)
Description
Connect-OVMgmt opens an authenticated session to an HPE OneView appliance and stores the resulting HPEOneView.Appliance.Connection object in the global $ConnectedSessions collection. The first connection established is automatically set as the default connection used by all subsequent cmdlets that accept -ApplianceConnection.
Three authentication flows are supported:
- PSCredential — supply a
[PSCredential]object (recommended). - Username / Password — supply credentials as plain strings. Both
-UserNameand-Passwordare marked[Obsolete]; prefer the PSCredential parameter set. - Certificate — supply a certificate object for two-factor (smart card) authentication. The appliance must be configured for 2-factor auth.
-LoginAcknowledge is not specified, the cmdlet prompts interactively. Use -LoginAcknowledge in unattended or scripted scenarios.
The cmdlet validates the appliance X-API version on connection and throws a terminating error if the appliance version is too old to be supported by this library version.
Parameters
FQDN or IP address of the HPE OneView appliance to connect to. Accepts the aliases
Appliance and Computername.A
[PSCredential] object containing the username and password. Use this parameter set instead of the deprecated -UserName / -Password parameters. Accepts the alias PSCredential.(Obsolete) Username for authentication. Prefer
-Credential. Accepts the aliases u and user.(Obsolete) Password for authentication. Accepts a plain
[String] or a [SecureString]. If omitted while using the UsernamePassword parameter set, the cmdlet prompts securely at runtime. Accepts the alias p.Name of the authentication directory (login domain) to use. Defaults to
LOCAL when not specified. LDAP/AD domain names embedded in the username (e.g. DOMAIN\user or user@domain.com) are detected automatically when this parameter is omitted. Accepts the alias authProvider.Certificate object used for two-factor or smart-card authentication. The appliance must have 2-factor authentication configured. Required for the
Certificate parameter set.Suppresses the interactive login-message acknowledgement prompt. Pass this switch in automated or non-interactive scripts when the appliance is configured with a login message that requires acknowledgement.
Return value
Returns anHPEOneView.Appliance.Connection object representing the authenticated session. The object is also added to $Global:ConnectedSessions.