Skip to content

Commit

Permalink
Added NVME Info Script
Browse files Browse the repository at this point in the history
Added NVME Info Script
  • Loading branch information
alanrenouf committed Jan 20, 2017
1 parent 3f3bd03 commit fa6c9f4
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Scripts/NVME Info.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<#
.NOTES
===========================================================================
Created by: Alan Renouf
Organization: VMware
Blog: http://virtu-al.net
Twitter: @alanrenouf
===========================================================================
#>

Foreach ($vmhost in Get-VMHost) {
$esxcli = get-esxcli -V2 -vmhost $vmhost
Write-Host "Host: $($vmhost.name)" -ForegroundColor Green
$devices = $esxcli.nvme.device.list.Invoke()
Foreach ($device in $devices) {
$nvmedevice = $esxcli.nvme.device.get.CreateArgs()
$nvmedevice.adapter = $device.HBAName
$esxcli.nvme.device.get.invoke($nvmedevice) | Select-Object ModelNumber, FirmwareRevision
$features = $esxcli.nvme.device.feature.ChildElements | Select-object -ExpandProperty name
ForEach ($feature in $features){
Write-Host "Feature: $feature" -ForegroundColor Yellow
$currentfeature = $esxcli.nvme.device.feature.$feature.get.CreateArgs()
$currentfeature.adapter = $device.HBAName
$esxcli.nvme.device.feature.$feature.get.Invoke($currentfeature)
}
}
}

0 comments on commit fa6c9f4

Please sign in to comment.