Servers - General
1825805 Members
2373 Online
109687 Solutions
New Discussion

How can I report the serial numbers of local disks of DL380 G9-10-11 servers using powersh

 
SOLVED
Go to solution
_Alper_
Occasional Contributor

How can I report the serial numbers of local disks of DL380 G9-10-11 servers using powersh

I have a command like the one below, but this command can only report disks belonging to gen9 and gen10 servers. I cannot see the disk serial numbers and disk information of my Gen11 servers with this command. Is there another command for gen11?

 

$appliances = 'oneview'
$reportUsername = '****'
$reportPassword = '******!'
$filePath = "D:\report\Scheduled_Reports\OneView_Reports\"
Connect-OVMgmt -Hostname $appliances -AuthLoginDomain Local -UserName $reportUsername -Password $reportPassword
(Get-OVServer | Select-Object -First 1000 | % { sr -uri ($_.uri + '/localStorage' )
 }).Data
 $exportPath = @{
   serverInventory = $filePath + "Server_Inventory\" + $reportName.serverInventory + $fileDate + ".csv";
 }  
3 REPLIES 3
Rakesh0404
HPE Pro
Solution

Re: How can I report the serial numbers of local disks of DL380 G9-10-11 servers using powersh

Hi 
Please find the below steps and link to get the storage drive serial number.
Link - https://support.hpe.com/docs/display/public/dp00003271en_us/index.html#rest/server-hardware?ref=GET%20%2Frest%2Fserver-hardware%2F%7Bid%7D%2FlocalStorageV2&query=GET%20%2Frest%2Fserver-hardware%2F%7Bid%7D%2FlocalStorageV2

 

Request

GET  https://{appl}/rest/server-hardware/123-45-67-89-123/localStorageV2

Content-Type: application/json
Auth: abcdefghijklmnopqrstuvwxyz012345
X-Api-Version: 4600
                        

 

The "data" attribute from response body will have the storage data based on the following schema:

 

Response will be same as in the page link shared.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
_Alper_
Occasional Contributor

Re: How can I report the serial numbers of local disks of DL380 G9-10-11 servers using pow

thank you for your support:)

Sunitha_Mod
Honored Contributor

Re: How can I report the serial numbers of local disks of DL380 G9-10-11 servers using pow

Hello @_Alper_,

That's awesome! 

We are extremely glad to know your concern has been addressed.