Power cli script

So I'm pretty new to powercli and I am wanting a simple script.

Basically I need a script that I check  a cluster for all attached datastores and show the available space of the datastores.

And then run it again with an add on for showing the vms on the datastore and their sizes.

Also is there a way to see which vms are currently registered to a particular datastore? So I put in the datastore name/naa id and it will reference vcenter to see which vms running or not that are registered in its inventory?
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:
Before going for a script, have you looked at RVTools by any chance? http://www.robware.net

It's a great tool to get loads of info from your VMware environment. Just a thought...

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
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
Scripting Languages

From novice to tech pro — start learning today.