Tuesday, 11 June 2019

Moving all standalone hosts into a cluster with PowerShell

The issue I hit was cause by trying to run a tool to disable TLS 1.0 and 1.1 across a number of deployments I'm working on (details on this can be found here)...

The TLS tool can target either a cluster to work through disabling SSL and TLS 1.0 and 1.1, or it can target a single host.  The customer I have been working with has many hundreds of hosts, across a number of sites... so on each vCenter, they have 50+ hosts ready to add to a cluster for consumption, depending on where the resource is required.  As such, to try and use the TLS tool to disable everything except TLS 1.2 would have been running a script 50 + times, having to specify the administrator@vsphere.local password each time.  Very time consuming

The easy solution as I saw it, was to add these hosts to a temporary cluster, run the script against the cluster level, then remove them...  Here's how I did it:

From PowerCLI, after connecting to the vCenter in question (connect-viserver vcenter.domain.local):

$clusterless  = get-vmhost | ?{ $_.Parent.Name -eq "host" }

This ran through all hosts registered against the vCenter, and found those with a parent of  'host' - i.e.  not a cluster member.

From this, you can use the 'Move-VMHost' command to move  all of these hosts into a temporary cluster.  I named mine 'tmp':

 This will move all of these hosts into your cluster (I had by this point restarted all of these hosts hence them not responding):

For the reverse, you can run the same command but replace "host" with the cluster name:
 N.B., I should have probably changed the variable name from $clusterless...!

After which, you can move these back to the root datacentre level by re-running the 'Move-VMHost' command:



16 comments:

  1. The 6 cd is a network of the UK based company in which the cloud automation stories are linked with the blog of huge sense. The motion of all standalone hosts has the cluster of power shell with the dignified of oxbridge essays for the proxy war sentence creativity and stances of well awareness.

    ReplyDelete
  2. I will always let you and your words become part of my day because you never know how much you make my day happier and more complete. There are even times when I feel so down but I will feel better right after checking your blogs. You have made me feel so good about myself all the time and please pay for assignment writing know that I do appreciate everything that you have

    ReplyDelete
  3. Presently, since there are such countless various ideas, themes and zones to deal with, it gets urgent that you overhaul the significant or troublesome zones every once in a while. You should amend each and every other month or following fifteen days. Thusly, it would be decent for you to adjust all the data to you. When you have appropriate clearness and comprehension of everything; you can perform unquestionably. best cleaning services dubai

    ReplyDelete
  4. Regardless of the amount you concentrated in your tutoring or before, you should have a starting line. You should understand what you know and where you stand. Presently, in the event that you will begin prep for your GMAT test, start with a test. When you step through an exam, you would know where you stand. affordable rent a car in lahore

    ReplyDelete
  5. The fake test is made by the relationship of the specific CFA test. Subsequently, you can get acclimated with the mentioning plan by meandering through a counterfeit assessment. Write an Essay For Me, By rehearsing while at the same time contemplating which issue you can contribute how much energy you can spend and which issue you ought to oversee first, you will truly have to manage the issue with no issue even upon the presence of the real CFA evaluation test.

    ReplyDelete
  6. Thanks for sharing this best stuff with us! Keep sharing! I am new in the blog writing.All types blogs and posts are not helpful for the readers.Here the author is giving good thoughts and suggestions to each and every readers through this article.Quality of the content is the main element get assignment help of the blog and this is the way of writing and presenting.

    ReplyDelete
  7. If you are in Broncos and needing to open another retail outlet nearby your region, by then a specialist Broncos stock association will be of exceptional help. There will be a gathering of significantly ace specialists that will work with you and consider shrewd musings. Furthermore, Pay Someone To Write Essay, you will really need to propel your things and organizations further.

    ReplyDelete
  8. I think, this tool will help online business owners, and they will run their businesses easily and earn a lot of profit. What do you think about this tool? Coursework writing services.

    ReplyDelete
  9. you cannot find the relevant information, Homework Writing Service then the knows the exact answer to your request. it is to do it yourself, so we want to make the whole process easier for you.

    ReplyDelete
  10. I’m usually to blogging and i actually appreciate your content. The article has genuinely peaks my interest. I’m going to bookmark your web page and maintain assignment writing help checking for new details. I am looking for some good blog sites for studying

    ReplyDelete
  11. I really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable. I would like to thank you professional writing services for the effort you made in writing this article.

    ReplyDelete
  12. If you are looking for Rent a Car in Islamabad or Rent a Car Rawalpindi then you are on right place.
    Pakistan Qureshi Tours offer all types of cars for rent
    Rent A Car Rawalpindi

    ReplyDelete
  13. The post is really superb. It’s varied accessory information that consists during a basic and necessary method. Thanks for sharing this text. The substance is genuinely composed. This web log is frequently sharing useful actualities. baseball letterman jacket Keep sharing a lot of posts.

    ReplyDelete
  14. Thanks for such wonderful blog that looks pretty different, I would suggest you please make a proper plan for your blog and start professional blogging as a career, One day you would be smart enough to earn some money mycred development wishing you a best of luck my friend, Thanks a lot for your nice support and love.

    ReplyDelete
  15. It is good to hear that your store is now expanding to new locations. I have been a patron of Fantastic Eyes because of all the wonderful work that you guys do. I hope that this expansion move of yours will beth dutton blue hooded coat turn out to be successful. I will definitely go and see this new store of yours

    ReplyDelete
  16. Markiplier is an American YouTuber, entertainer, webcast have, chief, essayist and a maker. His unique name is Mark Edward Fischabch who was brought into the world on June 28, 1989. He had a place with Honolulu, Hawaii and began his vocation in Cincinnati, Ohio.Markiplier Bio

    ReplyDelete