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 21
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.

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

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
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!

compdigit44Author Commented:
LOL... very true my wise friend....

Thanks Again
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.