- Community Home
- >
- Software
- >
- HPE OneView
- >
- PowerShell help
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- Report Inappropriate Content
06-14-2017 02:16 PM
06-14-2017 02:16 PM
Re: PowerShell help
Will do.
Thanks
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP