- Community Home
- >
- Software
- >
- HPE OneView
- >
- PowerShell help
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
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
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
тАО06-13-2017 12:38 PM
тАО06-13-2017 12:38 PM
PowerShell help
How do you access the properites of the server profile that have spaces in them? For example I am trying to get a list of all servers profiles that have a certain hardware type. I can't seem to filter based on the properites that have a space.
get-hpovserverprofile | ? {$_."server hardware type" -eq "BL460c Gen8 3"}
This returns nothing. I can't even select object on "server hardware type" in the get-hpovserverprofile cmdlet.
What am I missing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-13-2017 02:34 PM
тАО06-13-2017 02:34 PM
Re: PowerShell help
For future questions with the library, feel free to open an issue on the GitHub Issues Tracker (yes, even for questions like this).
That being said, the "Server Hardware Type" is a format column header, not an actual property. Objects from the HPE OneView API are what's called "Deflated Objects". Meaning, associative resources are via their URI. So, if you are trying to filter Server Hardware for a specific Hardware Type, please use the "-InputObject" parameter found in the current 3.00 library. This will take a Server Hardware Type or Server Profile object to filter the list of server hardware to what you are looking to do.
I am an HPE employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2017 01:38 PM
тАО06-14-2017 01:38 PM
Re: PowerShell help
Hi Chris,
Can you provide a link to the documentation or an example of this? I don't see an "inputobject" parameter on either get-hpovserverprofile or get-hpovserverhardwaretype on the githib cmdlet documentation.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2017 01:43 PM - edited тАО06-14-2017 01:44 PM
тАО06-14-2017 01:43 PM - edited тАО06-14-2017 01:44 PM
Re: PowerShell help
https://github.com/HewlettPackard/POSH-HPOneView/wiki/Get-HPOVServer
https://github.com/HewlettPackard/POSH-HPOneView/wiki/Get-HPOVServerProfile
https://github.com/HewlettPackard/POSH-HPOneView/wiki/Get-HPOVServerHardwareType
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2017 01:45 PM
тАО06-14-2017 01:45 PM
Re: PowerShell help
The -InputObject parameter exists in the Get-HPOVServer Cmdlet. You would pass in a SHT or Server Profile object to return a filtered list of Server Hardware resources.
Do you need a way to filter Profiles based on Hardware Type? I could look at extending the Get-HPOVServerProfile Cmdlet to allow Server Hardware Type objects to then filter the results. If that is what you are looking for, please submit an issue on the GitHub Issue Tracker for this request.
I am an HPE employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2017 01:53 PM
тАО06-14-2017 01:53 PM
Re: PowerShell help
Hi Chris,
Here is the goal. This might make what I am trying to do a little easier to understand. I need to indetify all server profiles assigned to blade servers with specifc LOM adapater. My though was to use the get-hpovserverprofile and pipe that into where server hardware type =x. As another example of where I would like to see these defalted objects is to have a powershell script return a list of all server profiles with their virtual serial number and include the phsyical serial number of the server hardare itself. Does that make sense?
Thanks,
Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2017 01:57 PM
тАО06-14-2017 01:57 PM
Re: PowerShell help
PLease go submit an issue on the tracker so we can continue the conversation there. It will also help me track enhancements, and provide others with a singular location to find conversations/threads like this for the library.
I am an HPE employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-14-2017 02:16 PM
тАО06-14-2017 02:16 PM
Re: PowerShell help
Will do.
Thanks