- Community Home
- >
- Software
- >
- HPE OneView
- >
- OneView Powershell Custom Report Available Fields
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
Forums
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
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
01-14-2021 10:22 AM
01-14-2021 10:22 AM
I'm attempting to create a custom report from oneview using the powershell library, but it would appear that not all the information I'm looking to collect is available from Get-OVServer. Specifically a rakcmount server's location. In oneview it has a location listed as (for example) Rack_01-02, however that property and that value don't appear to be grabbed with Get-OVServer. When i run "Get-OVServer -ServerName [SERVERNAME] | Format-List" I get the following items:
type :
name :
serverName :
state :
stateReason :
assetTag :
capabilities :
category :
created :
description :
eTag :
formFactor :
generation :
hostOsType :
imlMode :
intelligentProvisioningVersion :
licensingIntent :
locationUri :
maintenanceMode :
memoryMb :
migrationState :
model :
modified :
mpFirmwareVersion :
mpHostInfo :
mpLicenseType :
mpModel :
mpState :
oneTimeBoot :
operatingSystem :
partNumber :
physicalServerHardwareUri :
platform :
portMap :
position :
powerLock :
powerState :
processorCoreCount :
processorCount :
processorSpeedMhz :
processorType :
refreshState :
remoteSupportSettings :
remoteSupportUri :
romVersion :
scopesUri :
serialNumber :
serverFirmwareInventoryUri :
serverGroupUri :
serverHardwareTypeUri :
serverProfileUri :
serverSettings :
shortModel :
signature :
status :
subResources :
supportDataCollectionState :
supportDataCollectionType :
supportDataCollectionsUri :
supportState :
supportTestEventState :
uidState :
uri :
uuid :
virtualSerialNumber :
virtualUuid :
ApplianceConnection :
Is there a way to get the Rack name that Oneview has through Get-OVServer?
Solved! Go to Solution.
- Tags:
- HPEOneView.540
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2021 03:14 PM
01-14-2021 03:14 PM
SolutionThis information is stored in the Index, not the server hardware resource. I have been meaning to add a custom property to the server hardware resource object for PowerShell. For now, to get the location of a specific server, use the following:
# Get list of servers
$Servers = Get-OVServer
# Process the list of servers
ForEach ($server in $Servers) {
$uri = "/rest/index/associations/resources?childUri={0}&associationName=RACK_TO_PHYSICAL_DEVICE" -f $server.uri
Try {
# Try to get the location from the index for the server.
$Location = (Send-OVRequest -Uri $uri).members[0].parentResource.name
Write-Host "Server " $server.name " is located in " $Location " rack"
}
Catch {
Write-Error $_
}
}
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
