bbambalova
VMware Employee
VMware Employee

You can pipe to the Scan-Inventory the objects returned by Get-VMHost cmdlet.

Get-VMHost | Scan-Inventory

Is there any specific reason, because you want to pass the entity's name to the Scan-Inventory?