PowerCli 5.1 Filter Find VM Starting with a Specific Name and List vCPU's and Memory

I am still not that strong with powershell. Anyway I need to list all VM's that begin with a certain syntax and list their assigned vCPU's & Memory and export all results to a CSV
LVL 20
compdigit44Asked:
Who is Participating?
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.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
here you go in a one liner

Get-VM -Name SYNTAX* | Select Name,NumCpu,MemoryGB | Export-Csv -Path c:\temp\VMinfo.csv

Open in new window


just change the word SYNTAX for your string, so replace with the letter A* (wildcard) will list all VMs beginning with A etc
0

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
compdigit44Author Commented:
This worked perfectly!!!!

I tried to get-member | get-vm to list all properties but it failed. I was doing to see what options I could use to filter by
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
glad it worked for you!

Something for your Chritstmas Book list... a Powershell book!

http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=lucnot-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797
0
compdigit44Author Commented:
LOL... very true my wise friend....

Thanks Again
0
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
VMware

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.