Hello All,
I hope everybody is ok.Here is my question:
$viewhostsystemblabla01 = Get-View -viewtype hostsystem -filter @{ name = 'blabla01'}
$viewhostsystemblabla01.hardware.PciDevice
List of properties Name:
Bus
ClassId
DeviceId
DeviceName
Function
Id
ParentBridge
Slot
SubDeviceId
SubVendorId
VendorId
VendorName
Some of the Name for the following are displayed in a specific format :
SubDeviceId
SubVendorId
VendorId
VendorName
I think it is related to this:
https://www.vmware.com/support/orchestrator/doc/vro-vsphere65-api/html/VcHostPciDevice.html
The vendor ID of this PCI.
The vendor ID might be a negative value. A vSphere Server uses an unsigned short integer to represent a PCI vendor ID. The WSDL representation of the ID is a signed short integer. If the vendor ID is greater than 32767, the Server will convert the ID to its two's complement for the WSDL representation. When you specify a PCI device vendor ID for a virtual machine ({@link vim.vm.device.VirtualPCIPassthrough.DeviceBackingInfo}.vendorId), you must use the retrieved {@link vim.host.PciDevice}.deviceId value. @since VI API 2.5
We would like to have another format , One that is similar to this : VMware Compatibility Guide - I/O Device Search
Sorry if this was posted before.
Regards
You mean something like this?
ForEach-Object -Process {
$_.Hardware.PciDevice |
Select DeviceName,
@{N='VendorId';E={"{0:x4}" -f [int16]$_.VendorId}},
@{N='DeviceId';E={"{0:x4}" -f [int16]$_.DeviceId}}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You mean something like this?
ForEach-Object -Process {
$_.Hardware.PciDevice |
Select DeviceName,
@{N='VendorId';E={"{0:x4}" -f [int16]$_.VendorId}},
@{N='DeviceId';E={"{0:x4}" -f [int16]$_.DeviceId}}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That's it !
Thanks a million LucD and thanks again for constantly sharing with us