- Community Home
- >
- Software
- >
- HPE OneView
- >
- Powershell Question - Get-HPOVServer
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2016 01:58 PM - edited 10-11-2016 02:01 PM
10-11-2016 01:58 PM - edited 10-11-2016 02:01 PM
@ChrisLynch I am hoping you can chime in on this one. Earlier today I was pulling some data in regards to my servers - Specifically a manager was interested in Proc Model/Cpu Count/Core Count. The Canned report within OneView 2.0 has the proc model, but not the CPU Count or the Core count....and I didnt want to deal with looking everything up individually.
So I turned to the handy PS Module you have built. I decided to use Get-HPOVServer. When I run the function by itself, the default properties that are returned are: Name, Status, Power, Serial Number, Model, ROM, iLO, Server Profile, License.
This is great, almost all the info I need to pass up to my manager - just missing the info on the Proc. So I pipe Get-HPOVServer to a Get-Member, and there I see a NoteProperty for processorType, processorCount, processorCoreCount....Perfect!
So I figure Ill just run
Get-HPOVServer | Select * | Export-Csv
do some filtering and pretty up the report, and be done with it. But...when I do this, I lose my property "Server Profile" - In fact, when I go back and look at my Get-Member from earlier...I dont even see a property for the Server Profile...just serverProfileUri. I'd wanted to hang onto it since I can use our profile naming convention to easily determine some info on the server itself (esxi vs windows etc)
How are you pulling this property when I just run the function Get-HPOVServer by itself? I may be blindly missing it - but I can't figure out where this is coming from. I managed to combine the output from running it as is, and running it with a select * in order to get it...but there has got to be a simple way that I am completely overlooking.
Or, if there is a recommendation on a smarter way of pulling this type of info I would love to hear it!
Thanks!
-Cottoc
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2016 10:37 PM - last edited on 06-28-2021 09:23 PM by Ramya_Heera
10-11-2016 10:37 PM - last edited on 06-28-2021 09:23 PM by Ramya_Heera
SolutionThe Server Profile isn't actually a property of the Server Hardware resource object. What is happening when you run Get-HPOVServer is a ScriptBlock is executing within the Server.format.ps1xml file (aka formats file). The ScriptBlock is actually taking the serverProfileUri property value, passing to Send-HPOVRequest to then return the Server Profile object and only display the name property.
This behavior is based on the fact the library (and the REST API for that matter) only returns deflated resource objects. Objects do have associations with each other, and they typically are in the form of a URI property; serverProfileUri in this case. We are planning on providing a solution to this, but it will take a substantial amount of work to implement.
In the future, you can submit questions like this on the GitHub Issue Tracker, which isn't strictly for reporting issues.
I am an HPE employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2016 07:59 AM
10-12-2016 07:59 AM
Re: Powershell Question - Get-HPOVServer
Awesome - That makes perfect sense.
Also -
In the future, you can submit questions like this on the GitHub Issue Tracker, which isn't strictly for reporting issues.
Thanks for the heads up on that - I was hesitant as I wasn't sure it was specifically and issue and more of just not understanding the inner workings of your code. Ill direct any future questions that way.
Thanks!
-Cottoc