{"id":15224,"date":"2013-07-25T13:00:00","date_gmt":"2013-07-25T12:00:00","guid":{"rendered":"https:\/\/aidanfinn.com\/?p=15224"},"modified":"2013-07-25T13:00:00","modified_gmt":"2013-07-25T12:00:00","slug":"deploy-a-roles-or-features-to-lots-of-servers-at-once","status":"publish","type":"post","link":"https:\/\/aidanfinn.com\/?p=15224","title":{"rendered":"Deploy Roles Or Features To Lots Of Servers At Once"},"content":{"rendered":"<p>I\u2019m deploying a large cluster at the moment and I wanted to install the Failover Clustering feature to all the machines without logging, doing stuff, logging out, and repeating.&#160; This snippet of PowerShell took me 45 seconds to put together.&#160; The feature is installing on 8 machines (Demo-FS1 to Demo-FS8) while I\u2019m writing this blog post <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none\" alt=\"Smile\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2013\/07\/wlEmoticon-smile2.png\" \/><\/p>\n<p>For ($i = 1; $i -lt 9; $i++)   <br \/>{     <br \/>&#160;&#160;&#160; Install-WindowsFeature -ComputerName Demo-FS$i Failover-Clustering, RSAT-Clustering    <br \/>}<\/p>\n<p>The variable $i starts at 1, is used as part of the computer name that is remotely being updated, and then incremented in the next loop iteration.&#160; The loop ends after the 8th iteration, i.e. the 8th server is updated.<\/p>\n<p>Aint automation be-yoot-eeful?<\/p>\n<div id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:54e56768-7b18-4db0-ae7e-c2fa3d75499c\" class=\"wlWriterEditableSmartContent\" style=\"float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px\">Technorati Tags: <a href=\"http:\/\/technorati.com\/tags\/Windows+Server+2012\" rel=\"tag\">Windows Server 2012<\/a>,<a href=\"http:\/\/technorati.com\/tags\/Windows+Server+2012+R2\" rel=\"tag\">Windows Server 2012 R2<\/a>,<a href=\"http:\/\/technorati.com\/tags\/Failover+Clustering\" rel=\"tag\">Failover Clustering<\/a>,<a href=\"http:\/\/technorati.com\/tags\/Deployment\" rel=\"tag\">Deployment<\/a>,<a href=\"http:\/\/technorati.com\/tags\/Scripting\" rel=\"tag\">Scripting<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019m deploying a large cluster at the moment and I wanted to install the Failover Clustering feature to all the machines without logging, doing stuff, logging out, and repeating.&#160; This snippet of PowerShell took me 45 seconds to put together.&#160; The feature is installing on 8 machines (Demo-FS1 to Demo-FS8) while I\u2019m writing this blog &hellip; <a href=\"https:\/\/aidanfinn.com\/?p=15224\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Deploy Roles Or Features To Lots Of Servers At Once&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[20],"tags":[174,63,189,118,120],"class_list":["post-15224","post","type-post","status-publish","format-standard","hentry","category-hyper-v","tag-deployment","tag-failover-clustering","tag-scripting","tag-windows-server-2012","tag-windows-server-2012-r2"],"aioseo_notices":[],"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/15224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15224"}],"version-history":[{"count":0,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/15224\/revisions"}],"wp:attachment":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}