{"id":922415,"date":"2026-11-06T14:33:01","date_gmt":"2026-11-06T14:33:01","guid":{"rendered":"https:\/\/www.ninjaone.com\/blog\/instalar-failover-clustering-powershell\/"},"modified":"2026-11-06T14:33:02","modified_gmt":"2026-11-06T14:33:02","slug":"instalar-failover-clustering-powershell","status":"publish","type":"post","link":"https:\/\/www.ninjaone.com\/pt-br\/blog\/instalar-failover-clustering-powershell\/","title":{"rendered":"Como instalar o failover clustering com PowerShell"},"content":{"rendered":"<div class=\"in-context-cta\"><h2 style=\"text-align: left;\">Pontos principais<\/h2>\n<p style=\"text-align: left;\">O PowerShell automatiza a instala\u00e7\u00e3o do failover clustering no Windows Server, garantindo alta disponibilidade e configura\u00e7\u00e3o consistente<\/p>\n<ul>\n<li style=\"text-align: left;\">Abra o PowerShell como administrador e importe o m\u00f3dulo Failover Clusters com Import-Module FailoverClusters<\/li>\n<li style=\"text-align: left;\">Crie um novo cluster com New-Cluster, indicando os n\u00f3s e um endere\u00e7o IP est\u00e1tico<\/li>\n<li style=\"text-align: left;\">Adicione outros n\u00f3s com Add-ClusterNode e configure armazenamento ou redes com cmdlets como Add-ClusterSharedVolume e Set-ClusterNetworkRole<\/li>\n<li style=\"text-align: left;\">Use Test-Cluster para validar a configura\u00e7\u00e3o e Restart-Service para resolver problemas no servi\u00e7o de Cluster<\/li>\n<\/ul>\n<\/div>\n<p>O <a href=\"https:\/\/www.ninjaone.com\/pt-br\/blog\/cluster-de-failover\/\"><span style=\"font-weight: 400;\">failover clustering<\/span><\/a><span style=\"font-weight: 400;\"> garante alta disponibilidade e toler\u00e2ncia a falhas para servi\u00e7os cr\u00edticos em ambientes Windows Server. Use o PowerShell para automatizar a instala\u00e7\u00e3o e o gerenciamento do failover clustering. Essa abordagem simplifica a implanta\u00e7\u00e3o e mant\u00e9m a consist\u00eancia entre os sistemas. Este guia detalha as etapas para instalar o failover clustering com PowerShell e mostra seus recursos e benef\u00edcios.<\/span><\/p>\n<h2>Pr\u00e9-requisitos para o failover clustering com PowerShell<\/h2>\n<p><span style=\"font-weight: 400;\">Antes de entrar nos detalhes da instala\u00e7\u00e3o do failover clustering com PowerShell, \u00e9 essencial confirmar que o ambiente atende a alguns pr\u00e9-requisitos:<\/span><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Requisitos de hardware e software:<\/b><span style=\"font-weight: 400;\"> verifique se os servidores atendem aos requisitos de hardware do failover clustering, incluindo CPU, mem\u00f3ria e espa\u00e7o em disco. Al\u00e9m disso, confirme se todos os servidores executam uma vers\u00e3o compat\u00edvel do Windows Server.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Permiss\u00f5es e acesso administrativo:<\/b><span style=\"font-weight: 400;\"> s\u00e3o necess\u00e1rios privil\u00e9gios administrativos em todos os servidores envolvidos no processo de clustering. Garanta as permiss\u00f5es necess\u00e1rias para instalar e configurar o failover clustering.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Configura\u00e7\u00e3o de rede:<\/b><span style=\"font-weight: 400;\"> uma configura\u00e7\u00e3o de rede adequada \u00e9 essencial para o failover clustering. Confirme se todos os servidores t\u00eam conectividade de rede e est\u00e3o configurados com endere\u00e7os IP e defini\u00e7\u00f5es de DNS apropriados.<\/span><\/li>\n<\/ul>\n<h2>Primeiros passos com o PowerShell para failover clustering<\/h2>\n<p><span style=\"font-weight: 400;\">O <a href=\"https:\/\/www.ninjaone.com\/it-hub\/gerenciamento-de-endpoints\/what-is-powershell\/\" rel=\"noopener\" target=\"_blank\">PowerShell<\/a> \u00e9 uma linguagem de script e um shell de linha de comando que simplifica a administra\u00e7\u00e3o do Windows Server. Conhe\u00e7a suas fun\u00e7\u00f5es para automatizar tarefas com efici\u00eancia. Use o PowerShell para implantar e gerenciar o failover clustering de forma program\u00e1tica. Configure as pol\u00edticas de execu\u00e7\u00e3o e importe os m\u00f3dulos necess\u00e1rios para dar suporte \u00e0s opera\u00e7\u00f5es de clustering.<\/span><\/p>\n<h2>Cmdlets do PowerShell mais usados no failover clustering<\/h2>\n<p><span style=\"font-weight: 400;\">Conhecer os cmdlets essenciais do PowerShell para gerenciar o failover clustering \u00e9 fundamental. Veja alguns dos mais frequentes:<\/span><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Get-Cluster:<\/b><span style=\"font-weight: 400;\"> recupera informa\u00e7\u00f5es sobre o cluster de failover, incluindo n\u00f3s, recursos e configura\u00e7\u00e3o.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>New-Cluster:<\/b><span style=\"font-weight: 400;\"> cria um novo cluster de failover com os par\u00e2metros especificados.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Add-ClusterNode:<\/b><span style=\"font-weight: 400;\"> adiciona um n\u00f3 a um cluster de failover existente.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Test-Cluster:<\/b><span style=\"font-weight: 400;\"> executa testes de valida\u00e7\u00e3o do cluster para confirmar a configura\u00e7\u00e3o correta e a prontid\u00e3o.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Move-ClusterGroup:<\/b><span style=\"font-weight: 400;\"> move um grupo ou recurso de cluster para outro n\u00f3.<\/span><\/li>\n<\/ul>\n<h2>Passo a passo para instalar o failover clustering com PowerShell<\/h2>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Abra o PowerShell com privil\u00e9gios administrativos:<\/b><span style=\"font-weight: 400;\"> para come\u00e7ar, abra o PowerShell com privil\u00e9gios administrativos no Windows Server. Clique com o bot\u00e3o direito no \u00edcone do PowerShell e selecione \u201cExecutar como administrador\u201d para ter as permiss\u00f5es necess\u00e1rias \u00e0s tarefas de clustering.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Importe o m\u00f3dulo de failover clustering:<\/b><span style=\"font-weight: 400;\"> antes de usar os cmdlets do PowerShell para failover clustering, \u00e9 preciso importar o m\u00f3dulo correspondente. Execute o comando a seguir no PowerShell:<\/span><\/li>\n<\/ul>\n<p><em><strong>Import-Module FailoverClusters <\/strong><\/em><br \/>\n<span style=\"font-weight: 400;\">Esse comando importa o m\u00f3dulo de failover clustering e libera os cmdlets necess\u00e1rios para o gerenciamento do cluster.<\/span><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Crie um novo cluster de failover:<\/b><span style=\"font-weight: 400;\"> para criar um novo cluster de failover, use o cmdlet New-Cluster no PowerShell. Especifique o nome do cluster, o endere\u00e7o IP e outros par\u00e2metros relevantes. Veja um exemplo:<\/span><\/li>\n<\/ul>\n<p><code><em><strong>New-Cluster -Name \"MyCluster\" -Node \"Server1\", \"Server2\" -StaticAddress 192.168.1.100 -NoStorage <\/strong><\/em><\/code><br \/>\n<span style=\"font-weight: 400;\">Substitua \u201cMyCluster\u201d pelo nome desejado para o cluster, \u201cServer1\u201d e \u201cServer2\u201d pelos nomes dos servidores que deseja incluir e \u201c192.168.1.100\u201d pelo endere\u00e7o IP desejado para o cluster.<\/span><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Adicione n\u00f3s ao cluster de failover:<\/b><span style=\"font-weight: 400;\"> se houver servidores (n\u00f3s) adicionais para incluir no cluster de failover, use o cmdlet Add-ClusterNode. Execute o comando a seguir no PowerShell:<\/span><\/li>\n<\/ul>\n<p><code><em><strong>Add-ClusterNode -Cluster \"MyCluster\" -Name \"Server3\", \"Server4\" <\/strong><\/em><\/code><br \/>\n<span style=\"font-weight: 400;\">Substitua \u201cMyCluster\u201d pelo nome do seu cluster e \u201cServer3\u201d e \u201cServer4\u201d pelos nomes dos servidores adicionais que deseja adicionar.<\/span><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Configure os recursos do cluster:<\/b><span style=\"font-weight: 400;\"> depois de criar o cluster de failover, configure recursos como armazenamento compartilhado e defini\u00e7\u00f5es de rede. Use os cmdlets adequados conforme a necessidade:<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Para adicionar armazenamento compartilhado ao cluster, use o cmdlet Add-ClusterSharedVolume:<\/span><br \/>\n<code><em><strong>Add-ClusterSharedVolume -Name \"Cluster Disk 1\" -Cluster \"ClusterName\" <\/strong><\/em><\/code><br \/>\n<span style=\"font-weight: 400;\">Substitua \u201cCluster Disk 1\u201d pelo nome do disco compartilhado que deseja adicionar e \u201cClusterName\u201d pelo nome do seu cluster.<\/span><br \/>\n<span style=\"font-weight: 400;\">Para definir a fun\u00e7\u00e3o de uma interface de rede (por exemplo, cluster ou acesso de cliente), use o cmdlet Set-ClusterNetworkRole:<\/span><br \/>\n<code><em><strong>Set-ClusterNetworkRole -Name \"ClusterNetworkName\" -Role \"ClusterOnly\" <\/strong><\/em><\/code><br \/>\n<span style=\"font-weight: 400;\">Substitua \u201cClusterNetworkName\u201d pelo nome da interface de rede e \u201cClusterOnly\u201d pela fun\u00e7\u00e3o desejada.<\/span><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Ative os servi\u00e7os de alta disponibilidade:<\/b><span style=\"font-weight: 400;\"> para ativar servi\u00e7os e aplica\u00e7\u00f5es de alta disponibilidade no cluster, configure os recursos e as defini\u00e7\u00f5es de acordo. Isso pode incluir fun\u00e7\u00f5es em cluster, m\u00e1quinas virtuais e outros recursos.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Teste cen\u00e1rios de failover:<\/b><span style=\"font-weight: 400;\"> com o cluster de failover configurado, \u00e9 essencial testar cen\u00e1rios de failover para confirmar a resili\u00eancia e o desempenho. Use os cmdlets adequados para iniciar o failover e validar se servi\u00e7os e aplica\u00e7\u00f5es continuam funcionando sem interrup\u00e7\u00f5es.<\/span><\/li>\n<\/ul>\n<p>Seguindo essas instru\u00e7\u00f5es passo a passo, voc\u00ea instala o failover clustering <a href=\"https:\/\/www.ninjaone.com\/pt-br\/script-hub\/\">com PowerShell de forma eficiente e eficaz.<\/a><\/p>\n<h2>Boas pr\u00e1ticas para failover clustering com PowerShell<\/h2>\n<p><span style=\"font-weight: 400;\">Para garantir o melhor desempenho e a confiabilidade do cluster de failover, siga estas boas pr\u00e1ticas:<\/span><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Planeje a configura\u00e7\u00e3o do cluster:<\/b><span style=\"font-weight: 400;\"> antes de come\u00e7ar a configurar, planeje bem o cluster: n\u00famero de n\u00f3s, defini\u00e7\u00f5es de rede, requisitos de armazenamento e os servi\u00e7os ou aplica\u00e7\u00f5es que precisam de alta disponibilidade.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Adote uma conven\u00e7\u00e3o de nomes padr\u00e3o:<\/b><span style=\"font-weight: 400;\"> use uma conven\u00e7\u00e3o de nomes padr\u00e3o para os objetos do cluster, incluindo n\u00f3s, redes e recursos. Nomes consistentes facilitam identificar e gerenciar os componentes, principalmente em ambientes maiores com v\u00e1rios clusters.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Ative o Cluster-Aware Updating (CAU):<\/b><span style=\"font-weight: 400;\"> o Cluster-Aware Updating (CAU) automatiza a aplica\u00e7\u00e3o de patches e atualiza\u00e7\u00f5es nos n\u00f3s do cluster de failover, reduzindo o tempo de inatividade e as interrup\u00e7\u00f5es de servi\u00e7o. Use cmdlets do PowerShell para ativar e configurar o CAU e manter o cluster sempre com as atualiza\u00e7\u00f5es e os patches mais recentes.<\/span><\/li>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Documente configura\u00e7\u00f5es e procedimentos:<\/b><span style=\"font-weight: 400;\"> mantenha uma documenta\u00e7\u00e3o detalhada da configura\u00e7\u00e3o do cluster de failover, com topologia, configura\u00e7\u00f5es de rede, depend\u00eancias de recursos e procedimentos de failover. Use scripts do PowerShell para gerar e atualizar a documenta\u00e7\u00e3o automaticamente, garantindo precis\u00e3o e consist\u00eancia.<\/span><\/li>\n<\/ul>\n<h2>Como solucionar problemas de failover clustering com PowerShell<\/h2>\n<p><span style=\"font-weight: 400;\">Na solu\u00e7\u00e3o de problemas de failover clustering com PowerShell, v\u00e1rios cmdlets e scripts ajudam a identificar e resolver falhas comuns. Veja alguns exemplos:<\/span><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Verifique o status do servi\u00e7o de cluster:<\/b><span style=\"font-weight: 400;\"> use o cmdlet Get-ClusterNode para checar o status dos n\u00f3s do cluster e confirmar que todos est\u00e3o online e acess\u00edveis.<\/span><\/li>\n<\/ul>\n<p><em><strong>Get-ClusterNode <\/strong><\/em><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Confira os recursos do cluster:<\/b><span style=\"font-weight: 400;\"> use o cmdlet Get-ClusterResource para listar todos os recursos do cluster e verificar o status de cada um.<\/span><\/li>\n<\/ul>\n<p><em><strong>Get-ClusterResource <\/strong><\/em><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Analise os eventos do cluster:<\/b><span style=\"font-weight: 400;\"> use o cmdlet Get-ClusterLog para obter o log do cluster e procurar mensagens de erro ou avisos que indiquem poss\u00edveis problemas.<\/span><\/li>\n<\/ul>\n<p><em><strong>Get-ClusterLog -Node &lt;NodeName&gt; -StartTime (Get-Date).AddHours(-1) <\/strong><\/em><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Valide a configura\u00e7\u00e3o do cluster:<\/b><span style=\"font-weight: 400;\"> use o cmdlet Test-Cluster para executar um teste de valida\u00e7\u00e3o e identificar problemas de configura\u00e7\u00e3o.<\/span><\/li>\n<\/ul>\n<p><em><strong>Test-Cluster <\/strong><\/em><\/p>\n<ul>\n<li aria-level=\"1\" style=\"font-weight: 400;\"><b>Reinicie o servi\u00e7o de cluster:<\/b><span style=\"font-weight: 400;\"> use o cmdlet Restart-Service para reiniciar o servi\u00e7o de Cluster em um n\u00f3 espec\u00edfico.<\/span><\/li>\n<\/ul>\n<p><em><strong>Restart-Service -Name ClusSvc -ComputerName &lt;NodeName&gt; <\/strong><\/em><\/p>\n<h2>PowerShell para automa\u00e7\u00e3o e efici\u00eancia<\/h2>\n<p>O failover clustering garante alta disponibilidade e toler\u00e2ncia a falhas em ambientes Windows Server. Use o PowerShell para instalar e gerenciar clusters de failover, simplificar a implanta\u00e7\u00e3o, ganhar efici\u00eancia e manter a consist\u00eancia. Aplique o PowerShell a outras tarefas administrativas para ampliar a automa\u00e7\u00e3o e o controle operacional.<\/p>\n<div class=\"in-context-cta\"><p style=\"text-align: center;\">Veja o guia em v\u00eddeo <a href=\"https:\/\/www.ninjaone.com\/videos\/powershell\/how-to-use-powershell-to-install-failover-clustering\/\">Como usar o PowerShell para instalar o failover clustering<\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>O failover clustering garante alta disponibilidade e toler\u00e2ncia a falhas para servi\u00e7os cr\u00edticos em ambientes Windows Server. Use o PowerShell para automatizar a instala\u00e7\u00e3o e o gerenciamento do failover clustering. Essa abordagem simplifica a implanta\u00e7\u00e3o e mant\u00e9m a consist\u00eancia entre os sistemas. Este guia detalha as etapas para instalar o failover clustering com PowerShell e [&hellip;]<\/p>\n","protected":false},"author":35,"featured_media":225014,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[12373],"tags":[],"class_list":["post-922415","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-it-ops-pt-br"],"acf":[],"modified_by":null,"_links":{"self":[{"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/posts\/922415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/comments?post=922415"}],"version-history":[{"count":1,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/posts\/922415\/revisions"}],"predecessor-version":[{"id":922416,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/posts\/922415\/revisions\/922416"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/media\/225014"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/media?parent=922415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/categories?post=922415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ninjaone.com\/pt-br\/wp-json\/wp\/v2\/tags?post=922415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}