Correct/easiest way of determining whether an appliance is OneView for Synergy or Virtual Appliance #527
-
Right now I am checking by try-catching-{} Get-OVComposerNode, but perhaps there is an easier way of distinguishing a OneView Virtual Appliance from OneView for Synergy? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
You can do a GET on /rest/appliance/nodeinfo/version. Specifically look at the modelNumber property |
Beta Was this translation helpful? Give feedback.
-
Thank you for the suggestion. The ModelName property has exactly what I need. |
Beta Was this translation helpful? Give feedback.
-
The easiest way is to look at the 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
------------ ---- -------- --------------- -------
1 hpov1.dmain.local Administrator LOCAL True
[PS] C:\Users\clynch> $ConnectedSessions | fl
ConnectionID : 1
Name : hpov1.domain.local
UserName : Administrator
AuthLoginDomain : LOCAL
Default : True
[PS] C:\Users\clynch> $ConnectedSessions | fl *
ConnectionId : 1
Name : hpov1.domain.local
SessionID : OTE4NDE4NzI4NTAwAru8ioplii1Jli-KKhivsnPhT-PRPGfMZ
Username : Administrator
AuthLoginDomain : LOCAL
ApplianceType : VMA
AuthType : Credentials
Default : True
ActivePermissions : {Infrastructure administrator: AllResources}
ApplianceSecurityRoles : {Backup administrator, Infrastructure administrator, Read only, Scope administrator…} This is documented in the |
Beta Was this translation helpful? Give feedback.
-
Seems I forgot about that one. Thank you for taking the time to clarify. |
Beta Was this translation helpful? Give feedback.
The easiest way is to look at the
$ConnectedSessions
object created for you. This already populates a property calledApplianceType
which derives from theModelName
property of the URI call Vincent mentioned.So, if you wanted some logic to add to your scripts, do this:
There are more properties that what is shown by default, just like almost all PowerShell objects do. For instance: