48# get-inventory -Server (Get-VMHost tooshort*)
Get-Inventory : Cannot bind parameter 'Server'. Cannot convert "VMware.VimAutomation.Client20.VMHostI
mpl" to "VMware.VimAutomation.Types.VIServer".
At line:1 char:22
+ get-inventory -Server <<<< (Get-VMHost tooshort*)
Yes, all of my vmhosts are named after rappers from the 80's and 90's.
The reason is because host and server are not interchangable. In this context server could refer to an individual ESX host or a VC server managing many ESX hosts. You could rewrite this as get-inventory -location (get-vmhost tooshort*).
(Note: I edited the above for accuracy)
For -server you could do this:
$server = get-viserver 1.2.3.4
get-inventory -server $server
Of course, the error message could use some work.
(P.S. we all know your host is really called vanillaice and you change it just so we wouldn't laugh at you)
I guess I just need to better understand what a container is. I would not have thought of a server as a container.
Just for the record, you will note there is no mention of Vanilla Ice.
74# get-vmhost | ft name
Name
-
freshprince.qatest.iss.net
tooshort.qatest.iss.net
rundmc.qatest.iss.net
bonecrusher.qatest.iss.net # this belongs to another team
tupac.qatest.iss.net
devastator.qatest.iss.net # and this one
eazye.qatest.iss.net
icecube.qatest.iss.net
koolmoedee.qatest.iss.net
jazzyjeff.qatest.iss.net
Hmm, my copy of get-inventory doesn't have a container parameter.
Sorry, my mistake, -location.
In the help it says -location <VIContainer[]> and I got a little mixed up..