The HPE OneView PowerShell library supports simultaneous connections to multiple HPE OneView or HPE Synergy Composer appliances within a single PowerShell session. To enable this, the library uses a structured connection object and a global session tracker. When you callDocumentation 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.
Connect-OVMgmt, the library creates an HPEOneView.Appliance.Connection object and adds it to the global variable $ConnectedSessions. All subsequent cmdlets use this tracker to determine which appliance to target.
The $ConnectedSessions global variable
$ConnectedSessions is a module-level global variable that holds a collection of HPEOneView.Appliance.Connection objects — one per successful authentication. You can inspect it at any time:
The HPEOneView.Appliance.Connection object
Each successfulConnect-OVMgmt call creates one HPEOneView.Appliance.Connection object. This object tracks session state and metadata for a single appliance connection.
Connection object properties
Connection object properties
| Property | Type | Description |
|---|---|---|
ConnectionID | [Int] | A unique integer ID assigned per PowerShell session, incremented for each new connection. |
Name | [String] | The hostname of the appliance, as specified in the -Hostname parameter of Connect-OVMgmt. |
SessionID | [String] | The appliance API authentication session token. Changes when you modify active permissions with Push-OVAppliancePermission. |
UserName | [String] | The username that authenticated to the appliance. |
AuthLoginDomain | [String] | The name of the authentication directory resource used to authenticate the user. Set to LOCAL for local accounts. |
Default | [Bool] | Indicates whether this connection is the default target for cmdlets that do not specify -ApplianceConnection. Only one connection can be the default at a time. |
ApplianceType | [String] | The type of connected appliance (e.g., Composer, VM). Used internally for cmdlet validation. |
AuthType | [String] | The authentication method used: Credential for username/password, or Certificate for smart card / X.509 two-factor authentication. |
ActivePermissions | [Collection] | A collection of HPEOneView.Appliance.ConnectionPermission objects representing the roles and scopes available to the authenticated user. |
ApplianceSecurityRoles | [Array] | The full list of roles supported by this appliance. Used internally to validate role assignments. |
The
SSLChecked property is deprecated and no longer valid in current library versions.Connecting to multiple appliances
You can connect to multiple appliances in sequence. Each call toConnect-OVMgmt appends a new connection to $ConnectedSessions.
Using -ApplianceConnection in cmdlets
Most cmdlets accept an-ApplianceConnection parameter. If you do not provide it, the cmdlet defaults to processing all entries in $ConnectedSessions (or just the default connection, depending on the cmdlet).
You can specify the target appliance in two ways:
By connection object
Pass theHPEOneView.Appliance.Connection object you saved from Connect-OVMgmt:
By connection name
Pass the appliance hostname string (matching theName property):
The Default property
When you connect to your first appliance, theDefault property on that connection is automatically set to True. Subsequent connections are added with Default = False.
Cmdlets that target a single appliance use the default connection when -ApplianceConnection is not specified. To change which connection is the default, use Set-OVApplianceDefaultConnection:
ApplianceConnection property on returned resource objects
Every resource object returned by a cmdlet includes anApplianceConnection property of type HPEOneView.Library.ApplianceConnection. This lightweight object identifies which appliance the resource came from.
ConnectionID and Name values match the corresponding entry in $ConnectedSessions. You can reference these properties when passing resources to other cmdlets such as Send-OVRequest:
See also
- Connection permissions — Manage roles and scopes for an active session
- Two-factor authentication — Authenticate with smart cards and X.509 certificates
Get-Help Connect-OVMgmtGet-Help Set-OVApplianceDefaultConnectionGet-Help Disconnect-OVMgmt