Skip to content

Correct/easiest way of determining whether an appliance is OneView for Synergy or Virtual Appliance #527

Answered by ChrisLynchHPE
erikgraa asked this question in Q&A
Discussion options

You must be logged in to vote

The easiest way is to look at the $ConnectedSessions object created for you. This already populates a property called ApplianceType which derives from the ModelName property of the URI call Vincent mentioned.

So, if you wanted some logic to add to your scripts, do this:

# Check for Composer
($ConnectedSessions | Where Default).ApplianceType -eq 'Composer'

# Check for virtual machine
($ConnectedSessions | Where Default).ApplianceType -eq 'VMA'

There are more properties that what is shown by default, just like almost all PowerShell objects do. For instance:

[PS] C:\Users\clynch> $ConnectedSessions

ConnectionID Name              UserName      AuthLoginDomain Default
------------ ----

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ChrisLynchHPE
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #527 on December 08, 2020 19:14.