Wednesday, July 18, 2012

Powershell and VMware: "Get the list of all Virtual machines on VMware VSphere Server using PowerCLI.

 

HI,

In my first post about "Getting Started with VMware Vshpere PowerCLI" i already showed how to connect with VMware server.

Our today's task is simple. you get the list of all Virtual machines, and then we search for all "Powered ON" machines and after that all "Power off" machines.

Nothing complicated here. this is just a simple task and again the basic usage of Powershell is applies here. and we have some good "best friend " cmdlets those always with us. these cmdlets are "where-Object", "Select-Object".

Let's Start

Connect to your VMware server first using Connect-VIServer cmdlet. Once you successfully connected.

Run the Get-VM cmdlet.

That will show you the list of all Virtual machines including their "Power State"

18-07-2012 13-01-59 

If you want to see all the properties of Virtual Machines, run the below cmdlet.

Get-VM | Format-List *

Now you can see that we have detailed information about virtual machines.

18-07-2012 13-06-21 

And in case you want to know about a single Virtual Machine , use Get-Vm  and -Name of the machine and then Piped it to fl *

Get-Vm -Name "Dummy-Windows7" | fl * 

18-07-2012 13-18-05 

As i mentioned in the starting that our original target is to find the list of all Up and Running Virtual machines. To achieve that we can use Where-Object and show that Virtual machines whose status is equal to "Powered ON".

Get-vm | where { $_.PowerState -eq "PoweredOn"}

18-07-2012 13-20-08 

Finally i got he list of all "Power ON " server and  i am happy now :)

 

Thanks for reading.

Thanks!

Aman Dhally

Buy-More-Twitter-Followers 4fb29548b6adc  linkedin

114 comments:

  1. Your posts is really helpful for me.Thanks for your wonderful post. I am very happy to read your post. It is really very helpful for us and I have gathered some important information from this blog.

    Salesforce Training

    ReplyDelete

  2. I am following your blog from the beginning, it was so distinct & I had a chance to collect conglomeration of information that helps me a lot to improvise myself. I hope this will help many readers who are in need of this vital piece of information. Thanks for sharing & keep your blog updated.
    Salesforce training in Chennai|Fita Chennai Reviews

    ReplyDelete
  3. Your blog is really awesome and I got some useful information from your blog. This is really useful for me. Thanks for sharing such a informative blog. Keep posting.

    Regards..
    Cloud Training in Chennai

    ReplyDelete
  4. There are lots of information about latest technology and how to get trained in them, like Hadoop Training Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies(Hadoop Training in Chennai). By the way you are running a great blog. Thanks for sharing this.

    ReplyDelete

  5. Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.

    Modular Workstations Chennai

    ReplyDelete
  6. Nowadays, most of the businesses rely on cloud based CRM tool to power their business process. They want to access the business from anywhere and anytime. In such scenarios, salesforce CRM will ensure massive advantage to the business owners.
    Regards,
    Salesforce Administrator 201 Training in Chennai|Salesforce Administrator 211 Training in Chennai|Salesforce Training in Chennai

    ReplyDelete
  7. Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.
    qtp training in chennai

    ReplyDelete
  8. Your posts is really helpful for me.Thanks for your wonderful post.
    manual testing training in chennai

    ReplyDelete



  9. Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write.I like the post

    Modular Workstations Chennai

    ReplyDelete
  10. Thanks for providing this informative information you may also refer.
    http://www.s4techno.com/vmware-training-pune-online/

    ReplyDelete
  11. Your blog is very nice & much effective and thanks for sharing information. To find better jobs Vmware Jobs in Hyderabad.

    ReplyDelete
  12. Your blog is very nice & much effective and thanks for sharing information. To find better jobs Vmware Jobs in Hyderabad.

    ReplyDelete

  13. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharng this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  14. Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place..
    vmware courses london

    ReplyDelete
  15. You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...

    Android App Development Company

    ReplyDelete
  16. I am expecting more interesting topics from you. And this was nice content and definitely it will be useful for many people.
    iOS App Development Company
    iOS App Development Company

    ReplyDelete
  17. You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...
    Fitness SMS
    Fitness Text
    Salon SMS
    Salon Text
    Investor Relation SMS
    Investor Relation Text

    ReplyDelete
  18. Hi
    This blog is amazing. You can also visit here…

    VMware Corporate Training Delhi

    ReplyDelete
  19. This article is very much helpful and i hope this will be an useful information for the needed one. Keep on updating these kinds of informative things...
    Texting API
    Text message marketing
    Digital Mobile Marketing
    Mobile Marketing Services
    Mobile marketing companies
    Fitness SMS

    ReplyDelete
  20. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Mobile Marketing Service
    Mobile Marketing Companies

    ReplyDelete
  21. i read your content. it's unique and great informative.so please share some more content.
    VMware Training in Gurgaon

    ReplyDelete
  22. You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...
    PSD to Wordpress
    wordpress website development

    ReplyDelete
  23. • Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updatingAzure Online Training Hyderabad

    ReplyDelete
  24. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.

    Best Java Training Institute Chennai

    ReplyDelete
  25. This comment has been removed by the author.

    ReplyDelete
  26. Really Informative! Thanks for providing the details. I urge you to have a look on VMware Trainings

    ReplyDelete
  27. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site...

    Embedded training in chennai | Embedded training centre in chennai

    ReplyDelete
  28. Great and Awesome article.This blog very useful for me to learn and understand easily. Thanks for sharing this valuable information.Keep post like this.
    Angularjs Training in Chennai | Web Designing Training in Chennai

    ReplyDelete
  29. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
    Click here:
    Angularjs training in chennai


    Click here:
    angularjs training in bangalore

    Click here:
    angularjs training in online

    ReplyDelete
  30. Thank you for an additional great post. Exactly where else could anybody get that kind of facts in this kind of a ideal way of writing? I have a presentation next week, and I’m around the appear for this kind of data.
    Click here:
    Microsoft azure training in chennai


    Click here:
    Microsoft Azure training in online

    ReplyDelete
  31. It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read.

    Digital Marketing Training in Mumbai

    Six Sigma Training in Dubai

    Six Sigma Abu Dhabi

    ReplyDelete
  32. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    DevOps online Training|DevOps Training in USA
    Devops Training in Chennai

    Devops Training in Bangalore

    ReplyDelete
  33. Some us know all relating to the compelling medium you present powerful steps on this blog and therefore strongly encourage contribution from other ones on this subject while our own child is truly discovering a great deal. Have fun with the remaining portion of the year.
    python training in rajajinagar
    Python training in btm
    Python training in usa
    Python training in marathahalli

    ReplyDelete
  34. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    java online training | java training in pune

    java training in chennai | java training in bangalore

    ReplyDelete
  35. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    Good discussion. Thank you.
    Anexas
    Six Sigma Training in Abu Dhabi
    Six Sigma Training in Dammam
    Six Sigma Training in Riyadh

    ReplyDelete
  36. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    Good discussion. Thank you.
    Anexas
    Six Sigma Training in Abu Dhabi
    Six Sigma Training in Dammam
    Six Sigma Training in Riyadh

    ReplyDelete
  37. Appreciating the persistence, you put into your blog and detailed information you provide.
    safety training in chennai

    ReplyDelete
  38. Really great post, Thank you for sharing This knowledge.Excellently written article, if only all bloggers offered the same level of content as you, the internet would be a much better place. Please keep it up!
    Data science course in tambaram | Data Science course in anna nagar
    Data Science course in chennai | Data science course in Bangalore
    Data Science course in marathahalli | Data Science course in btm

    ReplyDelete
  39. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us. Do check Six Sigma Training in Bangalore | Six Sigma Training in Dubai & Get trained by an expert who will enrich you with the latest trends.

    ReplyDelete
  40. Hello, I read your blog occasionally, and I own a similar one, and I was just wondering if you get a lot of spam remarks?
    nebosh course in chennai

    ReplyDelete
  41. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
    Web Designing Course in chennai
    Java Training in Chennai
    Web Designing Training Institutes in Chennai
    Web Designing Course in Chennai with placement
    Java course in Chennai
    Java Training Institute in Chennai

    ReplyDelete
  42. This information is impressive. I am inspired with your post writing style & how continuously you describe this topic. Eagerly waiting for your new blog keep doing more.
    Aws Training Institutes in Bangalore
    Aws Certification Training in Bangalore
    Aws Training Center in Bangalore
    Best Institute For Java Training In Bangalore
    Java J2ee Courses In Bangalore

    ReplyDelete
  43. Good article, this is very much useful for us, thanks for it, keep blogging.
    DevOps Online Training

    ReplyDelete
  44. Awesome post. Really you are shared very informative concept... Thank you for sharing. Keep on updating…

    Article submission sites
    Guest posting sites

    ReplyDelete
  45. Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.

    AWS Training in Bangalore | Amazon Web Services Training in bangalore , india

    AWS Training in pune | Amazon Web Services Training in Pune, india

    ReplyDelete
  46. Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.

    Selenium Interview Questions and Answers

    Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

    Selenium Training in Bangalore | Best Selenium Training in Bangalore

    Free Selenium Tutorial |Selenium Webdriver Tutorial |For Beginners

    ReplyDelete
  47. Brilliant ideas that you have share with us.It is really help me lot and i hope it will help others also.update more different ideas with us.
    AngularJS Certification Training in T nagar
    AngularJS Training in Ambattur
    Angular 6 training in Bangalore
    Angular JS Training courses near me

    ReplyDelete
  48. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    python training in chennai
    java training in chennai

    ReplyDelete
  49. hi, nice information is given in this blog. Thanks for sharing this type of information, it is so useful for me. nice work keep it up. best digital marketing company in delhi

    ReplyDelete
  50. Thanks for posting useful information.You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...Really it was an awesome article...very interesting to read..please sharing like this information......
    PHP interview questions and answers | PHP interview questions | PHP interview questions for freshers | PHP interview questions and answers for freshers | php interview questions and answers for experienced | php viva questions and answers | php based interview questions

    ReplyDelete
  51. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...

    Article submission sites
    Technology

    ReplyDelete
  52. Thanks for the great post on your blog, it really gives me an insight on this topic.I must thank you for this informative ideas. I hope you will post again soon.
    devops Training in anna nagar
    devops Training in Chennai Anna Nagar
    devops training in bangalore
    best devops training in bangalore

    ReplyDelete
  53. Laminated Doors manufacturer in hubli
    Thanks for giving great kind of information. So useful and practical for me. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge.

    ReplyDelete
  54. led lawn lights in delhi
    Thanks for giving great kind of information. So useful and practical for me. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge.

    ReplyDelete
  55. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    Selenium training in Chennai

    ReplyDelete
  56. Those rules moreover attempted to wind up plainly a decent approach to perceive that other individuals online have the indistinguishable enthusiasm like mine to get a handle on incredible arrangement more around this condition
    iosh safety course in chennai

    ReplyDelete
  57. Goyal packers and movers in Panchkula is highly known for their professional and genuine packing and moving services. We are top leading and certified relocation services providers in Chandigarh deals all over India. To get more information, call us.

    Packers and movers in Chandigarh
    Packers and movers in Panchkula
    Packers and movers in Mohali
    Packers and movers in Zirakpur
    Packers and movers in Patiala
    Packers and movers in Ambala
    Packers and movers in Ambala cantt
    Packers and movers in Pathankot
    Packers and movers in Jalandhar
    Packers and movers in Ludhiana

    ReplyDelete
  58. I am grateful to the owner of this site which really shares this wonderful work of this site.That is actually great and useful information.I'm satisfied with just sharing this useful information with us. Please keep it up to date like this.Thank you for sharing..
    website designing company in patna
    packers and movers in patna
    cctv camera dealers in patna
    jobs in patna

    ReplyDelete
  59. I think this is the best article today about the future technology. Thanks for taking your own time to discuss this topic, I feel happy about that curiosity has increased to learn more about this topic.Artificial Intelligence Training in Bangalore. Keep sharing your information regularly for my future reference.

    ReplyDelete
  60. I think this is the best article today about the future technology. Thanks for taking your own time to discuss this topic, I feel happy about that curiosity has increased to learn more about this topic.Artificial Intelligence Training in Bangalore. Keep sharing your information regularly for my future reference.

    ReplyDelete
  61. Resources like the one you mentioned here will be very useful to me ! I will post to this page on my blog. I am sure my visitors will find that very useful

    href="https://www.mytrainingbangalore.com/seo-training-in-bangalore/" rel="nofollow"SEO Training in Bangalore
    href="https://www.mytrainingbangalore.com/" rel="nofollow"Best Training in Bangalore

    ReplyDelete
  62. hello sir,
    thanks for giving that type of information. Really enjoyed this blog post. Really looking forward to reading more. Much obliged.
    digital marketing company in delhi

    ReplyDelete
  63. Alot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definitely interested in this one. Just thought that I would post and let you know. Nice! thank you so much! Thank you for sharing.
    Website Development Company in Delhi
    Website Designing Company in Delhi
    Mobile App Development Company
    Mobile App Development Company in India

    ReplyDelete
  64. Nice and interesting post,I appreciate your hard work,keep uploading more, Thank you for sharing valuable information.
    App Development Company in Delhi

    ReplyDelete
  65. I am obliged to you for sharing this piece of information here and updating us with your resourceful guidance. Hope this might benefit many learners. Keep sharing this gainful articles and continue updating us.

    Php Institute in Gurgaon
    Php Course in Gurgaon
    Php Training in Gurgaon
    Java Institute in Gurgaon
    Java Course in Gurgaon
    Java Training in Gurgaon
    C++ Institute in Gurgaon
    C++ Course in Gurgaon
    C++ Training in Gurgaon

    ReplyDelete
  66. I am obliged to you for sharing this piece of information here and updating us with your resourceful guidance. Hope this might benefit many learners. Keep sharing this gainful articles and continue updating us.

    Php Institute in Gurgaon
    Php Course in Gurgaon
    Php Training in Gurgaon
    Java Institute in Gurgaon
    Java Course in Gurgaon
    Java Training in Gurgaon
    C++ Institute in Gurgaon
    C++ Course in Gurgaon
    C++ Training in Gurgaon

    ReplyDelete
  67. I feel happy about and learning more about this topic. keep sharing your information regularly for my future reference. This content creates a new hope and inspiration with in me. Thanks for sharing article like this. the information which you have provided is better then other blog.
    Best IELTS Coaching in Dwarka sector 12

    ReplyDelete
  68. The article is precise and neat.
    Sharing this great link for someone looking to Angular training in Bangalore.
    https://www.simplilearn.com/angular-certification-training-bangalore-city

    ReplyDelete
  69. Thank you for taking time to provide us some of the useful and exclusive information with us.
    Regards,
    selenium course in chennai

    ReplyDelete
  70. Hey Nice Blog!! Thanks For Sharing!!!Wonderful blog & good post.Its really helpful for me, waiting for a more new post. Keep Blogging!
    SEO company in coimbatore
    SEO company
    web design company in coimbatore

    ReplyDelete
  71. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article. thank you for sharing such a great blog with us.
    R Training Institute in Chennai | R Programming Training in Chennai

    ReplyDelete
  72. Thanks for providing wonderful information with us. Thank you so much.
    best java training institute in chennai

    ReplyDelete
  73. I feel happy about and learning more about this topic. keep sharing your information regularly for my future reference. This content creates new hope and inspiration within me. Thanks for sharing an article like this. the information which you have provided is better than another blog.
    Best IELTS Coaching in Dwarka sector 7

    ReplyDelete
  74. Thanks on you marvelous posting! I certainly enjoyed reading it, you are a great author.I will remember to bookmark your blog and will come back very

    Hy guyz

    Would like to be an IT professionals..? and wants to join in Top MNCs..? then DO This Course Devops Training in Bangalore

    ReplyDelete