{"id":1364,"date":"2017-01-05T09:52:25","date_gmt":"2017-01-05T12:52:25","guid":{"rendered":"http:\/\/www.franklinjr.com\/blog\/?p=1364"},"modified":"2017-01-05T09:52:25","modified_gmt":"2017-01-05T12:52:25","slug":"instalar-recursos-do-windows-2012-automaticamente","status":"publish","type":"post","link":"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/01\/05\/instalar-recursos-do-windows-2012-automaticamente\/","title":{"rendered":"Instalar recursos do Windows 2012 automaticamente"},"content":{"rendered":"<p>Meu cen\u00e1rio era o seguinte: eu tinha um servidor web com todas as features instaladas, tudo pronto, mas precisava criar um servidor com os mesmos recursos em outro lugar, o que fiz para agilizar o processo e para depois automatizar foi o seguinte. Peguei um servidor que eu j\u00e1 tinha pronto e exportei a lista das features j\u00e1 instaladas, fiz isso com o seguinte comando no powershell.<\/p>\n<pre lang=\"powershell\">\r\nGet-WindowsFeature | ? { $_.Installed } | Select Name | ForEach-Object { $_.Name } | Out-File .\\Features.txt\r\n<\/pre>\n<p>Traduzindo a linha: pega o nome de todas os recursos da m\u00e1quina que estejam instalados e joga cada nome em uma linha dentro do arquivo Features.txt<\/p>\n<p>Com esse .txt, copiei para o servidor rec\u00e9m instalado, abri o powershell e executei o seguinte comando<\/p>\n<pre lang=\"powershell\">\r\n$(Get-Content .\\Features.txt) | Add-WindowsFeature\r\n<\/pre>\n<p>Da\u00ed \u00e9 s\u00f3 esperar ser tudo instalado :D, me poupou bastante tempo esse processo.<br \/>\nAh, uma coisa, a m\u00e1quina deve ter conex\u00e3o com a internet para concluir a instala\u00e7\u00e3o com sucesso.<\/p>\n<p>Link base: <a href=\"http:\/\/jeffmurr.com\/blog\/?p=273\" target=\"_blank\">Importing and Exporting Windows Features with PowerShell<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Meu cen\u00e1rio era o seguinte: eu tinha um servidor web com todas as features instaladas, tudo pronto, mas precisava criar um servidor com os mesmos recursos em outro lugar, o que fiz para agilizar o processo e para depois automatizar foi o seguinte. Peguei um servidor que eu j\u00e1 tinha pronto e exportei a lista [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[553,51],"tags":[594,86,555],"class_list":["post-1364","post","type-post","status-publish","format-standard","hentry","category-power-shell","category-windows","tag-automatizacao","tag-servidor","tag-windows-2012"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Instalar recursos do Windows 2012 automaticamente - Franklin Jr.<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/01\/05\/instalar-recursos-do-windows-2012-automaticamente\/\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.franklinjr.com\\\/blog\\\/index.php\\\/2017\\\/01\\\/05\\\/instalar-recursos-do-windows-2012-automaticamente\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\\\/\\\/www.franklinjr.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Instalar recursos do Windows 2012 automaticamente\"}]}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Instalar recursos do Windows 2012 automaticamente - Franklin Jr.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/01\/05\/instalar-recursos-do-windows-2012-automaticamente\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/01\/05\/instalar-recursos-do-windows-2012-automaticamente\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/www.franklinjr.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Instalar recursos do Windows 2012 automaticamente"}]}]}},"_links":{"self":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1364"}],"version-history":[{"count":3,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1364\/revisions"}],"predecessor-version":[{"id":1367,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1364\/revisions\/1367"}],"wp:attachment":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}