I wrote a powershell script to find the NVME driver version. It kind of works well, but need help to tweak a bit.
If there are multiple NVME storage adapters, my code works good. If there is only 1 NVME storage adapter - it's not picking up the version correctly. (Refer the attached screenshot: on right side, if multiple NVME under storage controller - my code works good, if only 1 NVME under storage controller, my below code does not show full version)
If there are multiple NVME storage adapters - below code shows output as 1.4.1.21 (which is expected)
$NVME = Get-WmiObject win32_PNPSignedDriver | select devicename,driverversion | where {_.devicename -like "*AWS NVMe"}
$NVMEVersion = $NVME.driverversion[0]
If there is 1 NVME storage adapter, same above code shows output as 1
Can anyone help me with code to get the full version of NVME, no matter is it 1 NVME storage adapter or multiple?