vmware power cli commands

Hello ,

I need to use power cli and find for a specific vm ( vm-machine01 ) the following
the uuid
the host that is member of
the datastore that belongs to.

Also my coworker has a python script.  ( test.py) Can I run this on powercli ? Are the commands the same with the cpowercli commands ? I saw the script and the python commands are NOT the same.  He is using a HP discovery tool to run this script. ( ddmi)  Can I run the commands from powercli ?

any help would be appreciated.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
Could try something like this (note I haven't tested this):

Connect-VIServer <vCenterName>

Get-VM -Name vm-machine1| %{(Get-View $_.Id).config.uuid}, @{N="ESX Host";E={Get-VMHost -VM $_}}, 
@{N="Datastore";E={Get-Datastore -VM $_}} | Export-Csv -NoTypeInformation C:\Scripts\VM_Info.csv 

Open in new window

Regarding the Python script, the commands are most likely not the same (can't tell without taking a look at the script) and since you mention it's using a HP discovery tool it will most likely use other means to connect to the VMware environment, but again, can't tell for sure without seeing it.
You can run Python scripts if you have Python installed.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
c_hocklandAuthor Commented:
ok thank you so much !
I was also thinking that python is NOT the same with the powershell cli but wanted to confirm.
Thank you for your help on late Sunday.
Zephyr ICTCloud ArchitectCommented:
No problem, it's early monday here ;-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.