Share via


Instalar Serviços de Domínio do Active Directory (Nível 100)

 

Aplica-se A: Windows Server 2012 R2, Windows Server 2012

<_caps3a_sxs _xmlns3a_caps="https://schemas.microsoft.com/build/caps/2013/11"><_caps3a_sxstarget locale="pt-PT">Este tópico explica como instalar o AD DS no Windows Server 2012 utilizando qualquer um dos seguintes métodos:Credential requirements to run Adprep.exe and install Active Directory Domain Services Installing AD DS by Using Windows PowerShell Installing AD DS by using Server Manager Performing a Staged RODC Installation using the Graphical User Interface Requisitos de credenciais para executar o Adprep.exe e instalar Serviços de Domínio do Active DirectoryAs seguintes credenciais são necessárias para executar o Adprep.exe e instalar AD DS.Para instalar uma nova floresta, tem de ter a sessão iniciada como Administrador local para o computador.Para instalar um novo domínio subordinado ou uma nova árvore de domínio, tem de ter a sessão iniciada como membro do grupo Admins da Empresa.Para instalar um controlador de domínio adicional num domínio existente, tem de ser um membro do grupo Admins do Domínio.Se não executar o comando adprep.exe em separado e estiver a instalar o primeiro controlador de domínio que execute o Windows Server 2012 numa floresta ou domínio existente, ser-lhe-á solicitado que forneça credenciais para executar comandos Adprep. Os requisitos de credenciais são os seguintes:Para apresentar o primeiro controlador de domínio do Windows Server 2012 na floresta, terá de fornecer credenciais para um membro do grupo Administradores da Empresa, do grupo Administradores de Esquema e do grupo Admins do Domínio no domínio que aloja o mestre de esquemas.Para apresentar o primeiro controlador de domínio do Windows Server 2012 num domínio, terá de fornecer credenciais para um membro do grupo Admins do Domínio.Para apresentar o primeiro controlador de domínio só de leitura (RODC) na floresta, terá de fornecer credenciais para um membro do grupo Admins da Empresa.Se já estiver a executar o adprep/rodcprep no Windows Server 2008 ou Windows Server 2008 R2, não é necessário executá-lo novamente para o Windows Server 2012.Instalar o AD DS Utilizando o Windows PowerShellA começar com Windows Server 2012, pode instalar o AD DS através do Windows PowerShell. O Dcpromo.exe é preterido a começar com Windows Server 2012, mas pode continuar a executar dcpromo.exe utilizando um ficheiro de resposta (dcpromo /unattend:<answerfile> ou dcpromo /answer:<answerfile>). A capacidade para continuar a executar dcpromo.exe com um ficheiro de resposta fornece às organizações com recursos investidos no tempo de automatização existente a capacidade de converter a automatização de dcpromo.exe para o Windows PowerShell. Para obter mais informações sobre como executar dcpromo.exe com um ficheiro de resposta, consulte https://support.microsoft.com/kb/947034https://support.microsoft.com/kb/947034.Para obter mais informações acerca da remoção do AD DS através do Windows PowerShell, consulte Remove AD DS using Windows PowerShell.Comece por adicionar a função através do Windows PowerShell. Este comando instala a função de servidor do AD DS e instala as ferramentas de administração de servidor do AD DS e AD LDS, incluindo ferramentas baseadas em GUI, como ferramentas de linhas de comandos de Utilizadores e Computadores do Active Directory como dcdia.exe. As ferramentas de administração de servidor não estão instaladas por predefinição, quando utiliza o Windows PowerShell. Precisa de especificar – IncludeManagementTools para gerir o servidor local ou instalar Ferramentas de Administração de Servidor Remotohttps://www.microsoft.com/download/details.aspx?id=28972 para gerir um servidor remoto.Install-windowsfeature -name AD-Domain-Services –IncludeManagementTools <<Windows PowerShell cmdlet and arguments>>Não é necessário o reinício até após a instalação do AD DS estar concluída.Nessa altura, pode executar este comando para ver os cmdlets disponíveis no módulo ADDSDeployment.Get-command –module ADDSDeploymentPara ver a lista de argumentos que podem ser especificados para um cmdlets e sintaxe: Get-help <cmdlet name>Por exemplo, para ver os argumentos para a criação de uma conta desocupada de controlador de domínio só de leitura (RODC), escrevaGet-help Add-ADDSReadOnlyDomainControllerAccountOs argumentos opcionais aparecem entre parênteses retos.Também pode transferir os mais recentes exemplos de Ajuda e conceitos para os cmdlets do Windows PowerShell. Para obter mais informações, consulte about_Updatable_Helphttps://technet.microsoft.com/library/hh847735.aspx.Pode executar cmdlets do Windows PowerShell contra servidores remotos: No Windows PowerShell, utilize o comando invoke- com o cmdlet ADDSDeployment. Por exemplo, para instalar o AD DS num servidor remoto com o nome ConDC3 no domínio contoso.com, escreva:invoke-command {install-addsdomaincontroller –domainname contoso.com –credential (get-credential) –computername condc3-or-No Gestor de Servidores, crie um grupo de servidores que inclui o servidor remoto. Clique com o botão direito do rato no nome do servidor remoto e clique em Windows PowerShell.As secções seguintes explicam como executar os cmdlets do módulo ADDSDeployment para instalar o AD DS.ADDSDeployment cmdlet arguments Specifying Windows PowerShell Credentials Using test cmdlets Installing a new forest root domain using Windows PowerShell Installing a new child or tree domain using Windows PowerShell Installing an additional (replica) domain controller using Windows PowerShell Argumentos do cmdlet ADDSDeploymentA tabela seguinte apresenta uma lista de argumentos para os cmdlets ADDSDeployment do Windows PowerShell. Os argumentos a negrito são necessários. Os argumentos equivalentes para dcpromo.exe são listados entre parênteses se forem denominados de forma diferente no Windows PowerShell.Os comutadores do Windows PowerShell aceitam argumentos $TRUE ou $FALSE. Os argumentos que sejam $True por predefinição não precisam de ser especificados.Para substituir valores predefinidos, pode especificar o argumento com um valor $False. Por exemplo, por -installdns ser executado automaticamente para uma instalação de nova floresta se não for especificado, a única forma de impedir a instalação de DNS quando instala uma nova floresta é utilizar:-InstallDNS:$falseDa mesma forma, por –installdns ter um valor predefinido de $False se instalar um controlador de domínio num ambiente que não aloje o servidor DNS do Windows Server, terá de especificar o argumento seguinte para instalar o servidor DNS:-InstallDNS:$trueArgumentoDescriçãoADPrepCredential <PS Credential>Obrigatório se estiver a instalar o primeiro controlador de domínio do Windows Server 2012 num domínio ou floresta e as credenciais do utilizador atual forem insuficientes para efetuar a operação.Especifica a conta com associação ao grupo Administradores da Empresa e Administradores do Esquema que podem preparar a floresta, de acordo com as regras de Get-Credentialhttps://technet.microsoft.com/library/dd315327.aspx e um objeto PSCredential.Se não for especificado nenhum valor, é utilizado o valor do argumento –credential.AllowDomainControllerReinstallEspecifica se pretende continuar a instalar este controlador de domínio gravável, apesar do facto de que a outra conta de controlador de domínio gravável com o mesmo nome é detetada.Utilize $True apenas se tiver a certeza de que a conta não é atualmente utilizada por outro controlador de domínio gravável.A predefinição é $False.Este argumento não é válido para um RODC.AllowDomainReinstallEspecifica se um domínio existente é recriado.A predefinição é $False.AllowPasswordReplicationAccountName <string []>Especifica os nomes das contas de utilizador, contas de grupo e contas de computador cujas palavras-passe podem ser replicadas para este RODC. Utilize uma cadeia vazia "" se quiser manter o valor vazio. Por predefinição, apenas o Grupo de Replicação de Palavra-passe RODC Permitido é permitido e é originalmente criado vazio.Fornecer valores como uma matriz de cadeia. Por exemplo:-AllowPasswordReplicationAccountName "JSmith","JSmithPC","Branch Users"ApplicationPartitionsToReplicate <string []>Não existe nenhuma opção equivalente na IU. Se instalar utilizando a IU ou IFM, então, todas as partições de aplicação serão replicadas.Especifica as partições do diretório de aplicação a replicar. Este argumento é aplicado apenas quando especifica o argumento -InstallationMediaPath para instalar a partir do suporte de dados (IFM). Por predefinição, todas as partições de aplicação serão replicadas com base nos respetivos âmbitos.Fornecer valores como uma matriz de cadeia. Por exemplo:-ApplicationPartitionsToReplicate "partition1","partition2","partition3"ConfirmarSolicita a sua confirmação antes de executar o cmdlet.CreateDNSDelegationNão é possível especificar este argumento ao executar o cmdlet Add-ADDSReadOnlyDomainController.Indica se pretende criar uma delegação de DNS que referencia o novo servidor DNS que estiver a instalar juntamente com o controlador de domínio. Válido para o Active Directory – apenas com DNS integrado. Registos de delegação podem ser criados apenas nos servidores Microsoft DNS que estão online e acessíveis. Não é possível criar registos de delegação para domínios que estão imediatamente subordinados para domínios de nível superior como .com,. gov, .biz,. edu ou domínios de código de país de duas letras como .nz e .au.A predefinição é calculada automaticamente com base no ambiente.Credencial <PS Credential>Obrigatório apenas se as credenciais do utilizador atual forem insuficientes para efetuar a operação.Especifica a conta de domínio que pode iniciar sessão no domínio, de acordo com as regras de Get-credencialhttps://technet.microsoft.com/library/dd315327.aspx e um objeto PSCredential.Se não for especificado nenhum valor, são utilizadas as credenciais do utilizador atual.CriticalReplicationOnlyEspecifica se a operação de instalação do AD DS realiza apenas replicação crítica antes de reiniciar e, em seguida, continua. A replicação não crítica acontece depois de concluída a instalação e do reinicio do computador.Não é recomendado utilizar este argumento.Não existe nenhum equivalente para esta opção na interface de utilizador (IU).-DatabasePath <string>Especifica o caminho completamente qualificado que não seja UNC (Universal Naming Convention) para um diretório num disco fixo no computador local que contenha a base de dados do domínio, por exemplo, C:\Windows\NTDS.A predefinição é %SYSTEMROOT%\NTDS.Apesar de poder armazenar a base de dados do AD DS e ficheiros de registo no volume formatado com o Sistema de Ficheiros Resiliente (ReFS), não existem benefícios específicos para o alojamento do AD DS no ReFS, exceto os benefícios normais de resiliência que obtém para o alojamento de quaisquer dados no ReFS.DelegatedAdministratorAccountName <string>Especifica o nome de utilizador ou grupo que pode instalar e administrar o RODC.Por predefinição, apenas os membros do grupo Admins do Domínio podem administrar um RODC.DenyPasswordReplicationAccountName <string []>Especifica os nomes das contas de utilizador, contas de grupo e contas de computador cujas palavras-passe não são replicadas para este RODC. Utilize uma cadeia vazia "" se não quiser negar a replicação de credenciais de quaisquer utilizadores ou computadores. Por predefinição, Administradores, Operadores de Servidor, Operadores de Cópia de Segurança, Operadores de Conta e Grupo de Replicação de Palavra-passe de RODC são negados. Por predefinição, o Grupo de Replicação de Palavra-passe de RODC Negado inclui os Editores de Certificados, Admins de Domínio, Administradores de Empresa, Controladores de Domínio de Empresa, Controladores de Domínio de Empresa Só de Leitura, Proprietários de Criador de Política de Grupo, a conta krbtgt e Administradores de Esquema.Fornecer valores como uma matriz de cadeia. Por exemplo:-DenyPasswordReplicationAccountName "RegionalAdmins","AdminPCs"DnsDelegationCredential <PS Credential>Não é possível especificar este argumento ao executar o cmdlet Add-ADDSReadOnlyDomainController.Especifica o nome de utilizador e palavra-passe para a criação de delegação de DNS, de acordo com as regras de Get-Credencialhttps://technet.microsoft.com/library/dd315327.aspx e um objeto PSCredential.DomainMode <DomainMode> {Win2003 | Win2008 | Win2008R2 | Win2012 | Win2012R2}OuDomainMode <DomainMode> {2 | 3 | 4 | 5 | 6}Especifica o nível funcional do domínio durante a criação de um novo domínio.O nível funcional do domínio não pode ser inferior ao nível funcional de floresta, mas pode ser superior.O valor predefinido é calculado automaticamente e definido para o nível funcional da floresta existente ou para o valor definido para -ForestMode.DomainNameNecessário para os cmdlets Install-ADDSForest e Install-ADDSDomainController.Especifica o FQDN do domínio no qual pretende instalar um controlador de domínio adicional.DomainNetbiosName <string>Necessário para Install-ADDSForest se o nome do prefixo FQDN for superior a 15 carateres.Utilize com o Install-ADDSForest. Atribui um nome NetBIOS para o novo domínio de raiz de floresta.DomainType <DomainType> {ChildDomain | TreeDomain} ou {child | tree}Indica o tipo do domínio que pretende criar: uma nova árvore de domínio numa floresta existente, um subordinado de um domínio existente ou uma nova floresta.A predefinição para DomainType é ChildDomain.ForceQuando este parâmetro for especificado, quaisquer avisos que poderiam aparecer normalmente durante a instalação e a adição do controlador de domínio irão ser suprimidos para permitir que o cmdlet conclua a execução. Este parâmetro pode ser útil para incluir quando instala o scripting.ForestMode <ForestMode> {Win2003 | Win2008 | Win2008R2 | Win2012 | Win2012R2}OuForestMode <ForestMode> {2 | 3 | 4 | 5 | 6}Especifica o nível funcional da floresta quando cria uma nova floresta.O valor predefinido é Win2012.InstallationMediaPathIndica a localização do suporte de dados de instalação que vai ser utilizado para instalar um novo controlador de domínio.InstallDNSEspecifica se o serviço de servidor DNS deve ser instalado e configurado no controlador de domínio.Para uma nova floresta, a predefinição é $True e o servidor DNS é instalado.Para um novo domínio subordinado ou árvore de domínio, se o domínio principal (ou domínio de raiz de floresta para uma árvore de domínio) já aloja e armazena os nomes DNS do domínio, então, a predefinição para este parâmetro é $True.Para uma instalação de controlador de domínio num domínio existente, se este parâmetro não for especificado e o domínio atual já alojar e armazenar os nomes DNS do domínio, então, a predefinição para este parâmetro é $True. Caso contrário, se os nomes de domínio DNS estiverem alojados fora do Active Directory, a predefinição é $False e nenhum servidor DNS é instalado.LogPath <string>Especifica o caminho completamente qualificado de não UNC para um diretório num disco fixo no computador local que contém ficheiros de registo do domínio, por exemplo, C:\Windows\Logs.A predefinição é %SYSTEMROOT%\NTDS.Não armazene ficheiros de registo do Active Directory no volume de dados formatados com Sistema de Ficheiros Resiliente (ReFS).MoveInfrastructureOperationMasterRoleIfNecessaryEspecifica se pretende transferir a função de mestre de operações do mestre de infraestrutura (também conhecida como função de mestres de operações únicos flexíveis ou FSMO) para o controlador de domínio que está a criar — no caso de estar atualmente alojado num servidor de catálogo global — e não planear tornar o controlador de domínio que está a criar num servidor de catálogo global. Especificar este parâmetro para transferir a função mestre de infraestrutura para o controlador de domínio que está a criar caso a transferência seja necessária. Neste caso, especifique a opção NoGlobalCatalog se pretender que a função mestre de infraestrutura permaneça onde está atualmente.NewDomainName <string>Necessário apenas para Install-ADDSDomainEspecifica o nome de domínio simples para o novo nome de domínio.Por exemplo, se pretender criar um novo domínio subordinado com o nome emea.corp.fabrikam.com, deverá especificar emea como o valor deste argumento.NewDomainNetbiosName <string>Necessário para Install-ADDSDomain se o nome do prefixo FQDN for superior a 15 carateres.Utilize com o Install-ADDSDomain. Atribui um nome NetBIOS para o novo domínio. O valor predefinido é derivado do valor – NewDomainName.NoDNSOnNetworkEspecifica que o serviço DNS não está disponível na rede. Este parâmetro é utilizado apenas quando a definição de IP do adaptador de rede deste computador não está configurada com o nome de um servidor de DNS para a resolução do nome. Indica que um servidor DNS será instalado neste computador para a resolução do nome. Caso contrário, as definições de IP do adaptador de rede têm primeiro de ser configuradas com o endereço de um servidor DNS.A omissão deste parâmetro (o predefinido) indica que as definições de cliente de TCP/IP do adaptador de rede neste computador de servidor serão utilizadas para contactar um servidor DNS. Consequentemente, se não especificar este parâmetro, certifique-se de que definições de TCP/IP do cliente estão configuradas pela primeira vez com um endereço de servidor DNS preferido.NoGlobalCatalogEspecifica que não pretende que o controlador de domínio seja um servidor de catálogo global.Os controladores de domínio que executam o Windows Server 2012 são instalados com o catálogo global por predefinição. Por outras palavras, isto é executado automaticamente sem computação, a menos que especifique:-NoGlobalCatalogNoRebootOnCompletionEspecifica se deve reiniciar o computador após a conclusão do comando, independentemente do sucesso. Por predefinição, o computador irá reiniciar automaticamente. Para impedir que o servidor reinicie, especifique:-NoRebootOnCompletion:$TrueNão existe nenhum equivalente para esta opção na interface de utilizador (IU).ParentDomainName <string>Necessário para o cmdlet Install-ADDSDomainEspecifica o FQDN de um domínio principal existente. Utiliza este argumento quando instala um domínio subordinado ou nova árvore de domínio.Por exemplo, se pretender criar um novo domínio subordinado com o nome emea.corp.fabrikam.com, deverá especificar corp.fabrikam.com como o valor deste argumento.ReadOnlyReplicaEspecifica se pretende instalar o controlador de domínio só de leitura (RODC).ReplicationSourceDC <string>Indica o FQDN do controlador de domínio de parceiro a partir do qual replica as informações do domínio. A predefinição é calculada automaticamente.SafeModeAdministratorPassword <securestring>Fornece a palavra-passe da conta de administrador quando o computador for iniciado no Modo de Segurança ou numa variante do Modo de Segurança, como o Modo de Restauro dos Serviços de Diretório .A predefinição é uma palavra-passe vazia. Tem de fornecer uma palavra-passe. A palavra-passe tem de ser fornecida num formato System.Security.SecureString, tal como a fornecida por read-host -assecurestring ou ConvertTo-SecureString.A operação do argumento SafeModeAdministratorPassword é especial: caso não seja especificado como um argumento, o cmdlet irá pedir-lhe para introduzir e confirmar uma palavra-passe mascarada. Esta é a utilização preferida ao executar o cmdlet interativamente. Se for especificado sem um valor e não existirem outros argumentos especificados para o cmdlet, este pede-lhe para introduzir uma palavra-passe mascarada sem confirmação. Esta não é a utilização preferencial ao executar o cmdlet interativamente. Se for especificado com um valor, o valor tem de ser uma cadeia segura. Esta não é a utilização preferencial ao executar o cmdlet interativamente. Por exemplo, pode manualmente pedir uma palavra-passe utilizando o cmdlet Read-Host para solicitar ao utilizador uma cadeia segura:-safemodeadministratorpassword (read-host -prompt "Password:" -assecurestring). Também pode fornecer uma cadeia segura como uma variável de texto não encriptado convertida, apesar de não ser recomendável. -safemodeadministratorpassword (convertto-securestring "Password1" -asplaintext -force)SiteName <string>Necessário para o cmdlet Add-addsreadonlydomaincontrolleraccountEspecifica o site onde o controlador de domínio será instalado. Não existe nenhum argumento –sitename ao executar Install-ADDSForest porque o primeiro site criado é Default-First-Site-Name.O nome do site tem de já existir quando é fornecido como um argumento para -sitename. O cmdlet não irá criar o site.SkipAutoConfigureDNSIgnora a configuração automática de definições de cliente DNS, reencaminhadores e sugestões de raiz. Este argumento entra apenas em vigor se o serviço de Servidor DNS já estiver instalado ou automaticamente instalado com -InstallDNS.SystemKey <string>Especifica a chave de sistema para o suporte de dados a partir do qual replica os dados.A predefinição é Nenhum.Os dados têm de estar no formato fornecido por read-host -assecurestring ou ConvertTo-SecureString.SysvolPath <string>Especifica o caminho completamente qualificado de não UNC para um diretório num disco fixo no computador local, por exemplo, C:\Windows\SYSVOL.A predefinição é %SYSTEMROOT%\SYSVOL.Não é possível armazenar SYSVOL no volume de dados formatado com o Sistema de Ficheiros Resiliente (ReFS).SkipPreChecksNão executar as verificações de pré-requisitos antes de iniciar a instalação. Não é recomendado utilizar esta definição.WhatIfApresenta o que aconteceria mediante a execução do cmdlet. O cmdlet não é executado.Especificar Credenciais do Windows PowerShellPode especificar credenciais sem as revelar em texto simples no ecrã utilizando Get-credentialhttps://technet.microsoft.com/library/dd315327.aspx.A operação para os argumentos -SafeModeAdministratorPassword e LocalAdministratorPassword é especial:Caso não seja especificado como um argumento, o cmdlet irá pedir-lhe para introduzir e confirmar uma palavra-passe mascarada. Esta é a utilização preferencial ao executar o cmdlet interativamente.Se for especificado com um valor, o valor tem de ser uma cadeia segura. Esta não é a utilização preferencial ao executar o cmdlet interativamente.Por exemplo, pode pedir uma palavra-passe manualmente através do cmdlet Read-Host para pedir uma cadeia segura ao utilizador:-safemodeadministratorpassword (read-host -prompt "DSRM Password:" -assecurestring)Uma vez que a opção anterior não confirma a palavra-passe, tenha muito cuidado: a palavra-passe não está visível.Também pode fornecer uma cadeia segura como uma variável de texto não encriptado convertida, apesar de não ser recomendável.-safemodeadministratorpassword (convertto-securestring "Password1" -asplaintext -force)Não é recomendável o fornecimento ou armazenamento de uma palavra-passe em texto não encriptado. Qualquer pessoa que execute este comando num script ou que espreite por cima do seu ombro saberá a palavra passe do DSRM (Modo de Restauro dos Serviços de Diretório) desse controlador de domínio. Com esse conhecimento, é possível representar o próprio controlador de domínio e elevar os respetivos privilégios para o nível mais elevado numa floresta do Active Directory.Utilizar cmdlets de testeCada cmdlet ADDSDeployment tem um cmdlet de teste correspondente. Os cmdlets de teste executam apenas as verificações de pré-requisitos para a operação de instalação; as definições de instalação não são configuradas. Os argumentos para cada cmdlet de teste são iguais para o cmdlet de instalação correspondente, mas –SkipPreChecks não está disponível para os cmdlets de teste.Cmdlet de teste DescriçãoTest-ADDSForestInstallationExecuta os pré-requisitos para instalar uma nova floresta do Active Directory.Test-ADDSDomainInstallationExecuta os pré-requisitos para instalar um novo domínio no Active Directory.Test-ADDSDomainControllerInstallationExecuta os pré-requisitos para instalar um novo controlador de domínio no Active Directory.Test-ADDSReadOnlyDomainControllerAccountCreationExecuta os pré-requisitos para adicionar uma conta de controlador de domínio só de leitura (RODC).Instalar um domínio de raiz de nova floresta através do Windows PowerShellA sintaxe do comando para instalar uma nova floresta é a seguinte. Os argumentos opcionais aparecem dentro de parênteses retos.Install-ADDSForest [-SkipPreChecks] –DomainName <string> -SafeModeAdministratorPassword <SecureString> [-CreateDNSDelegation] [-DatabasePath <string>] [-DNSDelegationCredential <PS Credential>] [-NoDNSOnNetwork] [-DomainMode <DomainMode> {Win2003 | Win2008 | Win2008R2 | Win2012}] [-DomainNetBIOSName <string>] [-ForestMode <ForestMode> {Win2003 | Win2008 | Win2008R2 | Win2012}] [-InstallDNS] [-LogPath <string>] [-NoRebootOnCompletion] [-SkipAutoConfigureDNS] [-SYSVOLPath] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]O argumento - DomainNetBIOSName é necessário se pretender alterar o nome de 15 carateres que é gerado automaticamente com base no prefixo de nome de domínio DNS ou se o nome exceder 15 carateres.Por exemplo, para instalar uma nova floresta denominada corp.contoso.com e para que lhe seja pedido de forma segura que forneça a palavra-passe DSRM, escreva: Install-ADDSForest –domainname "corp.contoso.com" O servidor DNS é instalado por predefinição quando executa Install-ADDSForest.Para instalar uma nova floresta denominada corp.contoso.com, crie uma delegação de DNS no domínio contoso.com, defina o nível funcional do domínio para o Windows Server 2008 R2 e defina o nível funcional da floresta para Windows Server 2008, instale a base de dados do Active Directory e SYSVOL na unidade D:\, instale os ficheiros de registo na unidade E:\ e ser-lhe-á pedido que forneça a palavra-passe do Modo de Restauro dos Serviços de Diretório e escreva:Install-ADDSForest –DomainName corp.contoso.com –CreateDNSDelegation –DomainMode Win2008 –ForestMode Win2008R2 –DatabasePath "d:\NTDS" –SYSVOLPath "d:\SYSVOL" –LogPath "e:\Logs" Instalar um novo domínio subordinado ou de árvore através do Windows PowerShellA sintaxe do comando para instalar um novo domínio é a seguinte. Os argumentos opcionais aparecem dentro de parênteses retos.Install-ADDSDomain [-SkipPreChecks] –NewDomainName <string> -ParentDomainName <string> -SafeModeAdministratorPassword <SecureString> [-ADPrepCredential <PS Credential>] [-AllowDomainReinstall] [-CreateDNSDelegation] [-Credential <PS Credential>] [-DatabasePath <string>] [-DNSDelegationCredential <PS Credential>] [-NoDNSOnNetwork] [-DomainMode <DomainMode> {Win2003 | Win2008 | Win2008R2 | Win2012}] [DomainType <DomainType> {Child Domain | TreeDomain} [-InstallDNS] [-LogPath <string>] [-NoGlobalCatalog] [-NewDomainNetBIOSName <string>] [-NoRebootOnCompletion] [-ReplicationSourceDC <string>] [-SiteName <string>] [-SkipAutoConfigureDNS] [-Systemkey <SecureString>] [-SYSVOLPath] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]O argumento -credential só é necessário quando não tem atualmente a sessão iniciada como um membro do grupo Admins da Empresa.O argumento -NewDomainNetBIOSName é necessário se pretender alterar o nome de 15 carateres que é gerado automaticamente com base no prefixo de nome de domínio DNS ou se o nome exceder 15 carateres.Por exemplo, para utilizar as credenciais de corp\EnterpriseAdmin1 para criar um novo domínio subordinado com o nome child.corp.contoso.com, instale o servidor DNS, crie uma delegação de DNS no domínio corp.contoso.com, defina o nível funcional do domínio para o Windows Server 2003, torne o controlador de domínio num servidor de catálogo global num site com o nome Houston, utilize DC1.corp.contoso.com como controlador de domínio de origem de replicação, instale a base de dados do Active Directory e SYSVOL na unidade D:\ , instale os ficheiros de registo na unidade E:\ e será pedido que forneça a palavra-passe do Modo de Restauração de Serviços do Diretório mas não lhe for pedido para confirmar o comando, escreva:Install-ADDSDomain –SafeModeAdministratorPassword –credential (get-credential corp\EnterpriseAdmin1) –NewDomainName child –ParentDomainName corp.contoso.com –InstallDNS –CreateDNSDelegation –DomainMode Win2003 –ReplicationSourceDC DC1.corp.contoso.com –SiteName Houston –DatabasePath "d:\NTDS" –SYSVOLPath "d:\SYSVOL" –LogPath "e:\Logs" –Confirm:$FalseInstalar um controlador de domínio adicional (réplica) através do Windows PowerShellA sintaxe do comando para instalar um controlador de domínio adicional é a seguinte. Os argumentos opcionais aparecem dentro de parênteses retos.Install-ADDSDomainController -DomainName <string> [-SkipPreChecks] –SafeModeAdministratorPassword <SecureString> [-ADPrepCredential <PS Credential>] [-AllowDomainControllerReinstall] [-ApplicationPartitionsToReplicate <string[]>] [-CreateDNSDelegation] [-Credential <PS Credential>] [-CriticalReplicationOnly] [-DatabasePath <string>] [-DNSDelegationCredential <PS Credential>] [-NoDNSOnNetwork] [-NoGlobalCatalog] [-InstallationMediaPath <string>] [-InstallDNS] [-LogPath <string>] [-MoveInfrastructureOperationMasterRoleIfNecessary] [-NoRebootOnCompletion] [-ReplicationSourceDC <string>] [-SiteName <string>] [-SkipAutoConfigureDNS] [-SystemKey <SecureString>] [-SYSVOLPath <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]Para instalar um controlador de domínio e o servidor DNS no domínio corp.contoso.com e para que lhe seja pedido que forneça as credenciais de administrador de domínio e a palavra-passe DSRM, escreva: Install-ADDSDomainController -credential (get-credential corp\administrator) -domainname "corp.contoso.com" Se o computador estiver associado ao domínio e for membro do grupo Admins do Domínio, pode utilizar:Install-ADDSDomainController -domainname "corp.contoso.com"Para que lhe seja pedido o nome de domínio, escreva:Install-ADDSDomainController -credential (get-credential) -domainname (read-host "Domain to promote into")O comando seguinte irá utilizar credenciais de Contoso\EnterpriseAdmin1 para instalar um controlador de domínio gravável e um servidor de catálogo global num site com o nome Boston, instalar o servidor DNS, criar uma delegação de DNS no domínio contoso.com, instalar a partir de um suporte de dados que é armazenado na pasta IFM c:\ADDS, instalar a base de dados do Active Directory e SYSVOL na unidade D:\, instalar os ficheiros de registo na unidade E:\ , ter o servidor reiniciar automaticamente após a instalação do AD DS estar concluída e ser-lhe pedido para fornecer a palavra-passe do Modo de Restauro dos Serviços de Diretório:Install-ADDSDomainController –Credential (get-credential contoso\EnterpriseAdmin1) –CreateDNSDelegation –DomainName corp.contoso.com –SiteName Boston –InstallationMediaPath "c:\ADDS IFM" –DatabasePath "d:\NTDS" –SYSVOLPath "d:\SYSVOL" –LogPath "e:\Logs" Efetuar uma instalação RODC testada através do Windows PowerShellA sintaxe de comando para criar uma conta RODC é a seguinte. Os argumentos opcionais aparecem dentro de parênteses retos.Add-ADDSReadOnlyDomainControllerAccount [-SkipPreChecks] –DomainControllerAccuntName <string> -DomainName <string> -SiteName <string> [-AllowPasswordReplicationAccountName <string []>] [-NoGlobalCatalog] [-Credential <PS Credential>] [-DelegatedAdministratorAccountName <string>] [-DenyPasswordReplicationAccountName <string []>] [-InstallDNS] [-ReplicationSourceDC <string>] [-Force] [-WhatIf] [-Confirm] [<Common Parameters>]A sintaxe de comando para anexar um servidor a uma conta RODC é a seguinte. Os argumentos opcionais aparecem dentro de parênteses retos.Install-ADDSDomainController -DomainName <string> [-SkipPreChecks] –SafeModeAdministratorPassword <SecureString> [-ADPrepCredential <PS Credential>] [-ApplicationPartitionsToReplicate <string[]>] [-Credential <PS Credential>] [-CriticalReplicationOnly] [-DatabasePath <string>] [-NoDNSOnNetwork] [-InstallationMediaPath <string>] [-InstallDNS] [-LogPath <string>] [-MoveInfrastructureOperationMasterRoleIfNecessary] [-NoRebootOnCompletion] [-ReplicationSourceDC <string>] [-SkipAutoConfigureDNS] [-SystemKey <SecureString>] [-SYSVOLPath <string>] [-UseExistingAccount] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]Por exemplo, criar uma conta RODC denominada RODC1: Add-ADDSReadOnlyDomainControllerAccount –DomainControllerAccountName RODC1 –DomainName corp.contoso.com –SiteName Boston DelegatedAdministratoraccountName PilarAEm seguida, execute os seguintes comandos no servidor que pretende anexar à conta RODC1. O servidor não pode ser associado ao domínio. Primeiro, instale as ferramentas de gestão e função de servidor do AD DS:install-windowsfeature –name AD-Domain-Services -includemanagementtoolsExecute o seguinte comando para criar o RODC:Install-ADDSDomainController –DomainName corp.contoso.com –SafeModeAdministratorPassword (read-host –prompt "DSRM Password:" –assecurestring) –credential (get-credential Corp\PilarA) -useexistingaccountPrima S para confirmar ou incluir o argumento –confirm para impedir o pedido de confirmação.Instalar o AD DS utilizando o Gestor de ServidoresO AD DS pode ser instalado no Windows Server 2012 utilizando o Assistente Adicionar Funções no Gestor de Servidores, seguido pelo Assistente de Configuração dos Serviços de Domínio do Active Directory, que é novo início no Windows Server 2012. O Assistente de Instalação dos Serviços de Domínio do Active Directory (dcpromo.exe) é preterido começando no Windows Server 2012.As secções seguintes explicam como criar agrupamentos de servidor para instalar e gerir o AD DS em vários servidores e como utilizar os assistentes para instalar o AD DS.Criar agrupamentos de servidoresO Gestor de Servidores pode agrupar outros servidores na rede, desde que estejam acessíveis a partir do computador com o Gestor de Servidores. Depois de agrupados, escolhe esses servidores para instalação remota do AD DS ou quaisquer outras opções de configuração possíveis dentro do Gestor de Servidores. O computador com o Gestor de Servidores agrupa-se automaticamente. Para mais informações sobre agrupamentos de servidor, consulte Adicionar Servidores ao Gestor de Servidoreshttps://technet.microsoft.com/library/hh831453.aspx.Para gerir um computador associado ao domínio utilizando o Gestor de Servidores num servidor do grupo de trabalho, ou vice-versa, são necessários passos de configuração adicionais. Para mais informações, consulte "Adicionar e gerir servidores em grupos de trabalho" em Adicionar Servidores ao Gestor de Servidoreshttps://technet.microsoft.com/library/hh831453.aspx.Instalar o AD DSCredenciais administrativasOs requisitos de credenciais para instalar AD DS variam consoante a configuração de implementação que escolher. Para obter mais informações, consulte Credential requirements to run Adprep.exe and install Active Directory Domain Services.Utilize os procedimentos seguintes para instalar o AD DS utilizando o método GUI. Os passos podem ser executados localmente ou remotamente. Para obter explicações mais detalhadas destes passos, consulte os tópicos seguintes:Deploying a Forest with Server Manager Upgrade Existing AD DS Forests and Add Writable Replica Domain Controllers Create Child and Tree Domains Stage and Attach RODCs, Create RODCs without Staging Para instalar o AD DS utilizando o Gestor de ServidoresNo Gestor de Servidores, clique em Gerir e clique em Adicionar Funções e Funcionalidades para iniciar o Assistente Adicionar Funções.Na página Antes de começar, clique em Seguinte.Na página Selecionar tipo de instalação, clique em Instalação baseada em funções ou funcionalidades e, em seguida, clique em Seguinte.Na página Selecionar servidor de destino, clique em Selecionar um servidor a partir de um agrupamento de servidores, clique no nome do servidor onde pretende instalar o AD DS e, em seguida, clique em Seguinte.Para selecionar servidores remotos, cria um agrupamento de servidores e adiciona-lhes os servidores remotos. Para mais informações sobre como criar agrupamentos de servidor, consulte Adicionar Servidores ao Gestor de Servidoreshttps://technet.microsoft.com/library/hh831453.aspx.Na página Selecionar funções de servidor, clique em Serviços de Domínio do Active Directory, em seguida, na caixa de diálogo Assistente Adicionar Funções e Funcionalidades, clique em Adicionar Funcionalidades e, em seguida, em Seguinte.Na página Selecionar funcionalidades, selecione quaisquer funcionalidades adicionais que pretende instalar e clique em Seguinte.Na página Serviços de Domínio do Active Directory, reveja as informações e, em seguida, clique em Seguinte.Na página Confirmar seleções de instalação, clique em Instalar.Na página Resultados, verifique se a instalação foi bem-sucedida e clique em Promover este servidor para um controlador de domínio para iniciar o Assistente de Configuração dos Serviços de Domínio do Active Directory.Se fechar o Assistente de Adicionar Funções nesta altura sem iniciar o Assistente de Configuração do Serviços de Domínio do Active Directory, pode reiniciá-lo ao clicar em Tarefas no Gestor de Servidores.Na página Configuração da Implementação, selecione uma das seguintes opções: Se estiver a instalar um controlador de domínio adicional num domínio existente, clique em Adicionar um controlador de domínio a um domínio existente e escreva o nome do domínio (por exemplo, emea.corp.contoso.com) ou clique em Selecionar... para escolher um domínio e as credenciais (por exemplo, especifique uma conta que seja membro do grupo Admins do Domínio) e, em seguida, clique em Seguinte.O nome do domínio e as credenciais do utilizador atual são fornecidos por predefinição apenas se a máquina está associada ao domínio e está a efetuar uma instalação local. Se estiver a instalar o AD DS num servidor remoto, precisa de especificar as credenciais, por predefinição. Se as credenciais do utilizador atual não forem suficientes para executar a instalação, clique em Alterar... para poder especificar credenciais diferentes.Para obter mais informações, consulte Install a Replica Windows Server 2012 Domain Controller in an Existing Domain (Level 200).Se estiver a instalar um novo domínio subordinado, clique em Adicionar um novo domínio a uma floresta existente para Selecionar tipo de domínio, selecione Domínio Subordinado, escreva ou procure o nome do nome DNS do domínio do principal (por exemplo, corp.contoso.com), escreva o nome do novo domínio subordinado (por exemplo emea), escreva as credenciais a utilizar para criar o novo nome de domínio e, em seguida, clique em Seguinte.Para obter mais informações, consulte Install a New Windows Server 2012 Active Directory Child or Tree Domain (Level 200).Se estiver a instalar uma nova árvore de domínio, clique em Adicionar um novo domínio a uma floresta existente para Selecionar tipo de domínio, selecione Domínio de Árvore, escreva o nome do domínio de raiz (por exemplo, corp.contoso.com), escreva o nome DNS do novo domínio (por exemplo, fabrikam.com), escreva as credenciais a utilizar para criar o novo domínio e, em seguida, clique em Seguinte.Para obter mais informações, consulte Install a New Windows Server 2012 Active Directory Child or Tree Domain (Level 200).Se estiver a instalar uma nova floresta, clique em Adicionar um nova floresta e, em seguida, escreva o nome do domínio de raiz (por exemplo, corp.contoso.com).Para obter mais informações, consulte Install a New Windows Server 2012 Active Directory Forest (Level 200).Na página Opções de Controlador de Domínio, selecione uma das seguintes opções: Se estiver a criar uma nova floresta ou domínio, selecione os níveis funcionais do domínio e floresta, clique em Servidor do Sistema de Nomes de Domínio (DNS), especifique a palavra-passe DSRM e, em seguida, clique em Seguinte.Se estiver a adicionar um controlador de domínio a um domínio existente, clique em Servidor do Sistema de Nomes de Domínio (DNS), Catálogo Global (CG) ou Controlador de Domínio Só de Leitura (RODC) conforme necessário, selecione o nome do site, escreva a palavra-passe DSRM e, em seguida, clique em Seguinte.Para mais informações sobre que opções nesta página estão ou não disponíveis em diferentes condições, consulte Domain Controller Options.Na página Opções de DNS (que aparece apenas se instalar um servidor DNS), clique em Atualizar delegação de DNS conforme necessário. Se o fizer, forneça credenciais que têm permissão para criar registos de delegação de DNS na zona DNS principal.Se não é possível contactar um servidor DNS que aloja o horário de principal, a opção Atualizar delegação de DNS não está disponível.Para obter mais informações sobre se precisa ou não de atualizar a delegação DNS, consulte o artigo Compreender a Delegação de Zonahttps://technet.microsoft.com/library/cc771640.aspx. Se tentar atualizar a delegação de DNS e encontrar um erro, consulte DNS Options.Na página Opções de RODC (que aparece apenas se instalar um RODC), especifique o nome de um grupo ou utilizador que irá gerir o RODC, adicione contas para ou remova contas dos grupos de replicação de palavra-passe Permitidos ou Negados e, em seguida, clique em Seguinte.Para obter mais informações, consulte Política de Replicação de Palavra-passehttps://technet.microsoft.com/library/cc730883(v=ws.10).Na página Opções Adicionais, selecione uma das seguintes opções: Se estiver a criar um novo domínio, escreva um novo nome NetBIOS ou verifique o nome NetBIOS predefinido do domínio e, em seguida, clique em Seguinte.Se estiver a adicionar um controlador de domínio a um domínio existente, selecione o controlador de domínio de onde pretende replicar os dados de instalação do AD DS (ou permita que o assistente selecione qualquer controlador de domínio). Se estiver a instalar a partir de suporte de dados, clique em Instalar a partir do caminho de suporte de dados, escreva e verifique o caminho para os ficheiros de origem de instalação e, em seguida, clique em Seguinte.Não é possível utilizar a instalação a partir de um suporte de dados (IFM) para instalar o primeiro controlador de domínio num domínio. O IFM não funciona entre versões diferentes do sistema operativo. Por outras palavras, para instalar um controlador de domínio adicional que executa o Windows Server 2012 utilizando IFM, tem de criar o suporte de dados de cópia de segurança num controlador de domínio Windows Server 2012. Para mais informações sobre IFM, consulte Instalar um Controlador de Domínio Adicional ao Utilizar IFMhttps://technet.microsoft.com/library/cc816722(WS.10).aspx.Na página Caminhos, escreva as localizações para a base de dados do Active Directory, ficheiros de registo e pasta SYSVOL, ou aceite localizações predefinidas e clique em Seguinte.Não armazene a base de dados, ficheiros de registo ou a pasta SYSVOL do Active Directory num volume de dados formatados com Sistema de Ficheiros Resiliente (ReFS).Na página Opções de Preparação, escreva credenciais que sejam suficientes para executar adprep. Para obter mais informações, consulte Credential requirements to run Adprep.exe and install Active Directory Domain Services.Na página Opções de Revisão, confirme as suas seleções, clique em Ver script se pretender exportar as definições para um script do Windows PowerShell e, em seguida, clique em Seguinte.Na página Verificação de Pré-requisitos, confirme se a validação de pré-requisitos foi concluída e, em seguida, clique em Instalar.Na página Resultados, confirme que o servidor foi configurado com êxito como um controlador de domínio. O servidor será reiniciado automaticamente para concluir a instalação do AD DS.Efetuar uma instalação de RODC Testado utilizando a Interface GráficaUma instalação de RODC testado permite-lhe criar um RODC em duas fases. Na primeira fase, um membro do grupo de Admins do Domínio cria uma conta RODC. Na segunda fase, um servidor é ligado à conta RODC. A segunda fase pode ser concluída por um membro do grupo de Admins do Domínio ou um utilizador ou grupo de domínio delegado.Para criar uma conta RODC utilizando as ferramentas de gestão do Active DirectoryPode criar a conta RODC utilizando o Centro de Administração do Active Directory ou Utilizadores e Computadores do Active Directory.Clique em Iniciar, clique em Ferramentas Administrativas e, em seguida, clique em Centro de Administração do Active Directory.No painel de navegação (painel esquerdo), clique no nome do domínio.Na lista de Gestão (painel central), clique na UO Controladores de Domínio.No Painel de Tarefas (painel direito), clique em Pré-criar conta de controlador de domínio só de leitura.-Or-Clique em Iniciar, clique em Ferramentas Administrativas e clique em Utilizadores e Computadores do Active Directory.Clique com o botão direito do rato na unidade organizacional (UO) Controladores de Domínio ou clique na UO Controladores de Domínio e, em seguida, clique em Ação.Clique em Pré-criar conta de Controlador de Domínio Só de Leitura.Na página Bem-vindo ao Assistente de Instalação dos Serviços de Domínio do Active Directory se pretender modificar a Política de Replicação de Palavra-passe (PRP), selecione Utilizar instalação em modo avançado e, em seguida, clique em Seguinte.Na página Credenciais de Rede, em Especificar as credenciais de conta a utilizar para executar a instalação, clique em Minhas credenciais de início de sessão atuais ou clique em Credenciais alternativas e, em seguida, clique em Definir. Na caixa de diálogo Segurança do Windows, forneça o nome de utilizador e palavra-passe para uma conta que pode instalar o controlador de domínio adicional. Para instalar um controlador de domínio adicional, tem de ser um membro do grupo Admins de Empresa ou do grupo Admins do Domínio. Quando tiver terminado de fornecer credenciais, clique em Seguinte.Na página Especificar o Nome do Computador, escreva o nome de computador do servidor que será o RODC.Na página Selecionar um Site, selecione um site a partir da lista ou selecione a opção para instalar o controlador de domínio no site correspondente ao endereço IP do computador no qual está a executar o assistente e, em seguida, clique em Seguinte.Na página Opções de Controlador de Domínio Adicionais, efetue as seleções seguintes e, em seguida, clique em Seguinte:Servidor DNS: esta opção está selecionada por predefinição, para que o seu controlador de domínio possa funcionar como um servidor do Sistema de Nomes de Domínio (DNS). Se não pretender que o controlador de domínio seja um servidor DNS, desmarque esta opção. No entanto, se não instalar a função de servidor DNS no RODC e o RODC é o único controlador de domínio na filial, os utilizadores na filial não poderá efetuar a resolução do nome quando a rede alargada (WAN) para o site concentrador está offline.Catálogo global: esta opção está selecionada por predefinição. Adiciona o catálogo global, as partições de diretório só de leitura ao controlador de domínio e ativa a funcionalidade de pesquisa do catálogo global. Se não pretender que o controlador de domínio seja um servidor de catálogo global, desmarque esta opção. No entanto, se não instalar um servidor de catálogo global na filial ou ativar o caching de adesão ao grupo universal para o site que inclui o RODC, os utilizadores na filial não poderão iniciar sessão no domínio quando o WAN para o site concentrador estiver offline.Controlador de domínio só de leitura. Quando cria uma conta RODC, esta opção está selecionada por predefinição e não é possível desmarcá-la.Se tiver selecionado a caixa de verificação Utilizar a instalação em modo avançado na página Bem-vindo, é apresentada a página Especificar a Política de Replicação de Palavra-passe. Por predefinição, nenhuma palavra-passe de conta é replicada para o RODC e as contas de segurança confidenciais (por exemplo, membros do grupo Admins do Domínio) são explicitamente negadas de alguma vez terem tido as suas palavras-passe replicadas para o RODC.Para adicionar outras contas à política, clique em Adicionar, em seguida, clique em Permitir que as palavras-passe da conta, repliquem para este RODC ou clique em Negar palavras-passe da conta de replicar para este RODC e, em seguida, selecione as contas.Quando concluir (ou para aceitar a definição predefinida), clique em Seguinte.Na página Delegação de Instalação e Administração RODC, escreva o nome de utilizador ou grupo que irá anexar ao servidor da conta RODC que está a criar. Pode escrever o nome de apenas um principal de segurança.Para procurar o diretório para um grupo ou utilizador específico, clique em Definir. Em Selecionar Utilizador ou Grupo, escreva o nome do utilizador ou grupo. Recomendamos que delegue a instalação e administração RODC para um grupo.Este utilizador ou grupo também irá ter direitos administrativos locais no RODC após a instalação. Se não especificar um utilizador ou grupo, apenas os membros do grupo Admins do Domínio ou Admins da Empresa poderão anexar o servidor à conta.Quando tiver terminado, clique em Seguinte.Na página Resumo, reveja as suas seleções. Clique em Anterior para alterar quaisquer seleções, se necessário.Para guardar as definições que selecionou para um ficheiro de resposta que pode utilizar para automatizar operações do AD DS subsequentes, clique em Exportar definições. Escreva um nome para o ficheiro de resposta e, em seguida, clique em Guardar.Quando tiver a certeza de que as suas seleções estão corretas, clique em Seguinte para criar a conta RODC.Na página Assistente de Instalação de Serviços de Domínio do Active Directory, clique em Concluir.Depois de ser criada uma conta RODC, pode anexar um servidor à conta para concluir a instalação RODC. Esta segunda fase pode ser concluída na filial onde o RODC será localizado. O servidor onde realizar este procedimento não deve estar associado ao domínio. Com início no Windows Server 2012, utiliza o Assistente Adicionar Funções no Gestor de Servidores para anexar um servidor a uma conta RODC.Para anexar um servidor a uma conta RODC utilizando o Gestor de ServidoresInicie sessão como administrador local.No Gestor de Servidores, clique em Adicionar funções e funcionalidades.Na página Antes de começar, clique em Seguinte.Na página Selecionar tipo de instalação, clique em Instalação baseada em funções ou funcionalidades e, em seguida, clique em Seguinte.Na página Selecionar servidor de destino, clique em Selecionar um servidor a partir de um agrupamento de servidores, clique no nome do servidor onde pretende instalar o AD DS e, em seguida, clique em Seguinte.Na página Selecionar funções de servidor, clique em Serviços de Domínio do Active Directory, clique em Adicionar Funcionalidades e, em seguida, clique em Seguinte.Na página Selecionar funcionalidades, selecione quaisquer funcionalidades adicionais que pretende instalar e clique em Seguinte.Na página Serviços de Domínio do Active Directory, reveja as informações e, em seguida, clique em Seguinte.Na página Confirmar seleções de instalação, clique em Instalar.Na página Resultados, verifique se a Instalação foi bem-sucedida e clique em Promover este servidor para um controlador de domínio para iniciar o Assistente de Configuração dos Serviços de Domínio do Active Directory.Se fechar o Assistente de Adicionar Funções nesta altura sem iniciar o Assistente de Configuração do Serviços de Domínio do Active Directory, pode reiniciá-lo ao clicar em Tarefas no Gestor de Servidores.Na página Configuração da Implementação, clique em Adicionar um controlador de domínio para um domínio existente, escreva o nome do domínio (por exemplo, emea.contoso.com) e as credenciais (por exemplo, especifique uma conta que é delegada para gerir e instalar o RODC) e, em seguida, clique em Seguinte.Na página Opções de Controlador de Domínio, clique em Utilizar conta RODC existente, escreva e confirme a palavra-passe do Modo de Restauro dos Serviços de Diretório e, em seguida, clique em Seguinte.Na página Opções Adicionais, se estiver a instalar a partir de um suporte de dados, clique em Instalar a partir do caminho de suporte de dados, escreva e verifique o caminho para os ficheiros de origem da instalação, selecione o controlador de domínio de onde pretende replicar os dados de instalação do AD DS (ou permita que o assistente selecione qualquer controlador de domínio) e, em seguida, clique em Seguinte.Na página Caminhos, escreva as localizações para a base de dados do Active Directory, ficheiros de registo e pasta SYSVOL, ou aceite localizações predefinidas e, em seguida, clique em Seguinte.Na página Opções de Revisão, confirme as suas seleções, clique em Ver Script para exportar as definições para um script do Windows PowerShell e, em seguida, clique em Seguinte.Na página Verificação de Pré-requisitos, confirme se a validação de pré-requisitos foi concluída e, em seguida, clique em Instalar.Para concluir a instalação do AD DS, o servidor irá reiniciar automaticamente.Troubleshooting Domain Controller Deployment Install a New Windows Server 2012 Active Directory Forest (Level 200) Install a New Windows Server 2012 Active Directory Child or Tree Domain (Level 200) Install a Replica Windows Server 2012 Domain Controller in an Existing Domain (Level 200) <_caps3a_sxssource locale="en-US">This topic explains how to install AD DS in Windows Server 2012 by using any of the following methods:Credential requirements to run Adprep.exe and install Active Directory Domain Services Installing AD DS by Using Windows PowerShell Installing AD DS by using Server Manager Performing a Staged RODC Installation using the Graphical User Interface Credential requirements to run Adprep.exe and install Active Directory Domain ServicesThe following credentials are required to run Adprep.exe and install AD DS.To install a new forest, you must be logged on as the local Administrator for the computer.To install a new child domain or new domain tree, you must be logged on as a member of the Enterprise Admins group.To install an additional domain controller in an existing domain, you must be a member of the Domain Admins group.If you do not run adprep.exe command separately and you are installing the first domain controller that runs Windows Server 2012 in an existing domain or forest, you will be prompted to supply credentials to run Adprep commands. The credential requirements are as follows:To introduce the first Windows Server 2012 domain controller in the forest, you need to supply credentials for a member of Enterprise Admins group, the Schema Admins group, and the Domain Admins group in the domain that hosts the schema master.To introduce the first Windows Server 2012 domain controller in a domain, you need to supply credentials for a member of the Domain Admins group.To introduce the first read-only domain controller (RODC) in the forest, you need to supply credentials for a member of the Enterprise Admins group.If you have already run adprep /rodcprep in Windows Server 2008 or Windows Server 2008 R2, you do not need to run it again for Windows Server 2012.Installing AD DS by Using Windows PowerShellBeginning with Windows Server 2012, you can install AD DS using Windows PowerShell. Dcpromo.exe is deprecated beginning with Windows Server 2012, but you can still run dcpromo.exe by using an answer file (dcpromo /unattend:<answerfile> or dcpromo /answer:<answerfile>). The ability to continue running dcpromo.exe with an answer file provides organizations that have resources invested in existing automation time to convert the automation from dcpromo.exe to Windows PowerShell. For more information about running dcpromo.exe with an answer file, see https://support.microsoft.com/kb/947034https://support.microsoft.com/kb/947034.For more information about removing AD DS using Windows PowerShell, see Remove AD DS using Windows PowerShell.Start with adding the role using Windows PowerShell. This command installs the AD DS server role and installs the AD DS and AD LDS server administration tools, including GUI-based tools such as Active Directory Users and Computers and command-line tools such as dcdia.exe. Server administration tools are not installed by default when you use Windows PowerShell. You need to specify –IncludeManagementTools to manage the local server or install Remote Server Administration Toolshttps://www.microsoft.com/download/details.aspx?id=28972 to manage a remote server.Install-windowsfeature -name AD-Domain-Services –IncludeManagementTools <<Windows PowerShell cmdlet and arguments>>There is no reboot required until after the AD DS installation is complete.You can then run this command to see the available cmdlets in the ADDSDeployment module.Get-command –module ADDSDeploymentTo see the list of arguments that can be specified for a cmdlets and syntax: Get-help <cmdlet name>For example, to see the arguments for creating an unoccupied read-only domain controller (RODC) account, typeGet-help Add-ADDSReadOnlyDomainControllerAccountOptional arguments appear in square brackets.You can also download the latest Help examples and concepts for Windows PowerShell cmdlets. For more information, see about_Updatable_Helphttps://technet.microsoft.com/library/hh847735.aspx.You can run Windows PowerShell cmdlets against remote servers: In Windows PowerShell, use invoke-command with the ADDSDeployment cmdlet. For example, to install AD DS on a remote server named ConDC3 in the contoso.com domain, type:invoke-command {install-addsdomaincontroller –domainname contoso.com –credential (get-credential) –computername condc3-or-In Server Manager, create a server group that includes the remote server. Right-click the name of the remote server and click Windows PowerShell.The next sections explain how to run ADDSDeployment module cmdlets to install AD DS.ADDSDeployment cmdlet arguments Specifying Windows PowerShell Credentials Using test cmdlets Installing a new forest root domain using Windows PowerShell Installing a new child or tree domain using Windows PowerShell Installing an additional (replica) domain controller using Windows PowerShell ADDSDeployment cmdlet argumentsThe following table lists arguments for the ADDSDeployment cmdlets in Windows PowerShell. Arguments in bold are required. Equivalent arguments for dcpromo.exe are listed in parentheses if they are named different in Windows PowerShell.Windows PowerShell switches accept $TRUE or $FALSE arguments. Arguments that are $True by default do not need to be specified.To override default values, you can specify the argument with a $False value. For example, because -installdns is automatically run for a new forest installation if it is not specified, the only way to prevent DNS installation when you install a new forest is to use:-InstallDNS:$falseSimilarly, because –installdns has a default value of $False if you install a domain controller in an environment that does not host Windows Server DNS server, you need to specify the following argument in order to install DNS server:-InstallDNS:$trueArgumentDescriptionADPrepCredential <PS Credential>Required if you are installing the first Windows Server 2012 domain controller in a domain or forest and the credentials of the current user are insufficient to perform the operation.Specifies the account with Enterprise Admins and Schema Admins group membership that can prepare the forest, according to the rules of Get-Credentialhttps://technet.microsoft.com/library/dd315327.aspx and a PSCredential object.If no value is specified, the value of the –credential argument is used.AllowDomainControllerReinstallSpecifies whether to continue installing this writable domain controller, despite the fact that another writable domain controller account with the same name is detected.Use $True only if you are sure that the account is not currently used by another writable domain controller.The default is $False.This argument is not valid for an RODC.AllowDomainReinstallSpecifies whether an existing domain is recreated.The default is $False.AllowPasswordReplicationAccountName <string []>Specifies the names of user accounts, group accounts, and computer accounts whose passwords can be replicated to this RODC. Use an empty string "" if you want to keep the value empty. By default, only the Allowed RODC Password Replication Group is allowed, and it is originally created empty.Supply values as a string array. For example:-AllowPasswordReplicationAccountName "JSmith","JSmithPC","Branch Users"ApplicationPartitionsToReplicate <string []>There is no equivalent option in the UI. If you install using the UI, or using IFM, then all application partitions will be replicated.Specifies the application directory partitions to replicate. This argument is applied only when you specify the -InstallationMediaPath argument to install from media (IFM). By default, all application partitions will replicate based on their own scopes.Supply values as a string array. For example:-ApplicationPartitionsToReplicate "partition1","partition2","partition3"ConfirmPrompts you for confirmation before running the cmdlet.CreateDnsDelegationYou cannot specify this argument when you run the Add-ADDSReadOnlyDomainController cmdlet.Indicates whether to create a DNS delegation that references the new DNS server that you are installing along with the domain controller. Valid for Active Directory–integrated DNS only. Delegation records can be created only on Microsoft DNS servers that are online and accessible. Delegation records cannot be created for domains that are immediately subordinate to top-level domains such as .com, .gov, .biz, .edu or two-letter country code domains such as .nz and .au.The default is computed automatically based on the environment.Credential <PS Credential>Required only if the credentials of the current user are insufficient to perform the operation.Specifies the domain account that can logon to the domain, according to the rules of Get-Credentialhttps://technet.microsoft.com/library/dd315327.aspx and a PSCredential object.If no value is specified, the credentials of the current user are used.CriticalReplicationOnlySpecifies whether the AD DS installation operation performs only critical replication before reboot and then continues. The noncritical replication happens after the installation finishes and the computer reboots.Using this argument is not recommended.There is no equivalent for this option in the user interface (UI).DatabasePath <string>Specifies the fully qualified, non–Universal Naming Convention (UNC) path to a directory on a fixed disk of the local computer that contains the domain database, for example, C:\Windows\NTDS.The default is %SYSTEMROOT%\NTDS.While you can store the AD DS database and log files on volume formatted with Resilient File System (ReFS), there are no specific benefits for hosting AD DS on ReFS, other than the normal benefits of resiliency you get for hosting any data on ReFS.DelegatedAdministratorAccountName <string>Specifies the name of the user or group that can install and administer the RODC.By default, only members of the Domain Admins group can administer an RODC.DenyPasswordReplicationAccountName <string []>Specifies the names of user accounts, group accounts, and computer accounts whose passwords are not to be replicated to this RODC. Use an empty string "" if you do not want to deny the replication of credentials of any users or computers. By default, Administrators, Server Operators, Backup Operators, Account Operators, and the Denied RODC Password Replication Group are denied. By default, the Denied RODC Password Replication Group includes Cert Publishers, Domain Admins, Enterprise Admins, Enterprise Domain Controllers, Enterprise Read-Only Domain Controllers, Group Policy Creator Owners, the krbtgt account, and Schema Admins.Supply values as a string array. For example:-DenyPasswordReplicationAccountName "RegionalAdmins","AdminPCs"DnsDelegationCredential <PS Credential>You cannot specify this argument when you run the Add-ADDSReadOnlyDomainController cmdlet.Specifies the user name and password for creating DNS delegation, according to the rules of Get-Credentialhttps://technet.microsoft.com/library/dd315327.aspx and a PSCredential object.DomainMode <DomainMode> {Win2003 | Win2008 | Win2008R2 | Win2012 | Win2012R2}OrDomainMode <DomainMode> {2 | 3 | 4 | 5 | 6}Specifies the domain functional level during the creation of a new domain.The domain functional level cannot be lower than the forest functional level, but it can be higher.The default value is automatically computed and set to the existing forest functional level or the value that is set for -ForestMode.DomainNameRequired for Install-ADDSForest and Install-ADDSDomainController cmdlets.Specifies the FQDN of the domain in which you want to install an additional domain controller.DomainNetbiosName <string>Required for Install-ADDSForest if FQDN prefix name is longer than 15 characters.Use with Install-ADDSForest. Assigns a NetBIOS name to the new forest root domain.DomainType <DomainType> {ChildDomain | TreeDomain} or {child | tree}Indicates the type of domain that you want to create: a new domain tree in an existing forest, a child of an existing domain, or a new forest.The default for DomainType is ChildDomain.ForceWhen this parameter is specified any warnings that might normally appear during the installation and addition of the domain controller will be suppressed to allow the cmdlet to complete its execution. This parameter can be useful to include when scripting installation.ForestMode <ForestMode> {Win2003 | Win2008 | Win2008R2 | Win2012 | Win2012R2}OrForestMode <ForestMode> {2 | 3 | 4 | 5 | 6}Specifies the forest functional level when you create a new forest.The default value is Win2012.InstallationMediaPathIndicates the location of the installation media that will be used to install a new domain controller.InstallDnsSpecifies whether the DNS Server service should be installed and configured on the domain controller.For a new forest, the default is $True and DNS Server is installed.For a new child domain or domain tree, if the parent domain (or forest root domain for a domain tree) already hosts and stores the DNS names for the domain, then the default for this parameter is $True.For a domain controller installation in an existing domain, if this parameter is left unspecified and the current domain already hosts and stores the DNS names for the domain, then the default for this parameter is $True. Otherwise, if DNS domain names are hosted outside of Active Directory, the default is $False and no DNS Server is installed.LogPath <string>Specifies the fully qualified, non-UNC path to a directory on a fixed disk of the local computer that contains the domain log files, for example, C:\Windows\Logs.The default is %SYSTEMROOT%\NTDS.Do not store the Active Directory log files on a data volume formatted with Resilient File System (ReFS).MoveInfrastructureOperationMasterRoleIfNecessarySpecifies whether to transfer the infrastructure master operations master role (also known as flexible single master operations or FSMO) to the domain controller that you are creating—in case it is currently hosted on a global catalog server—and you do not plan to make the domain controller that you are creating a global catalog server. Specify this parameter to transfer the infrastructure master role to the domain controller that you are creating in case the transfer is needed; in this case, specify the NoGlobalCatalog option if you want the infrastructure master role to remain where it currently is.NewDomainName <string>Required only for Install-ADDSDomain.Specifies the single domain name for the new domain.For example, if you want to create a new child domain named emea.corp.fabrikam.com, you should specify emea as the value of this argument.NewDomainNetbiosName <string>Required for Install-ADDSDomain if FQDN prefix name is longer than 15 characters.Use with Install-ADDSDomain. Assigns a NetBIOS name to the new domain. The default value is derived from the value of –NewDomainName.NoDnsOnNetworkSpecifies that DNS service is not available on the network. This parameter is used only when the IP setting of the network adapter for this computer is not configured with the name of a DNS server for name resolution. It indicates that a DNS server will be installed on this computer for name resolution. Otherwise, the IP settings of the network adapter must first be configured with the address of a DNS server.Omitting this parameter (the default) indicates that the TCP/IP client settings of the network adapter on this server computer will be used to contact a DNS server. Therefore, if you are not specifying this parameter, ensure that TCP/IP client settings are first configured with a preferred DNS server address.NoGlobalCatalogSpecifies that you do not want the domain controller to be a global catalog server.Domain controllers that run Windows Server 2012 are installed with the global catalog by default. In other words, this runs automatically without computation, unless you specify:-NoGlobalCatalogNoRebootOnCompletionSpecifies whether to restart the computer upon completion of the command, regardless of success. By default, the computer will restart. To prevent the server from restarting, specify:-NoRebootOnCompletion:$TrueThere is no equivalent for this option in the user interface (UI).ParentDomainName <string>Required for Install-ADDSDomain cmdletSpecifies the FQDN of an existing parent domain. You use this argument when you install a child domain or new domain tree.For example, if you want to create a new child domain named emea.corp.fabrikam.com, you should specify corp.fabrikam.com as the value of this argument.ReadOnlyReplicaSpecifies whether to install a read-only domain controller (RODC).ReplicationSourceDC <string>Indicates the FQDN of the partner domain controller from which you replicate the domain information. The default is automatically computed.SafeModeAdministratorPassword <securestring>Supplies the password for the administrator account when the computer is started in Safe Mode or a variant of Safe Mode, such as Directory Services Restore Mode.The default is an empty password. You must supply a password. The password must be supplied in a System.Security.SecureString format, such as that provided by read-host -assecurestring or ConvertTo-SecureString.The SafeModeAdministratorPassword argument's operation is special:If not specified as an argument, the cmdlet prompts you to enter and confirm a masked password. This is the preferred usage when running the cmdlet interactively.If specified without a value, and there are no other arguments specified to the cmdlet, the cmdlet prompts you to enter a masked password without confirmation. This is not the preferred usage when running the cmdlet interactively.If specified with a value, the value must be a secure string. This is not the preferred usage when running the cmdlet interactively.For example, you can manually prompt for a password by using the Read-Host cmdlet to prompt the user for a secure string:-safemodeadministratorpassword (read-host -prompt "Password:" -assecurestring)You can also provide a secure string as a converted clear-text variable, although this is highly discouraged. -safemodeadministratorpassword (convertto-securestring "Password1" -asplaintext -force)SiteName <string>Required for the Add-addsreadonlydomaincontrolleraccount cmdletSpecifies the site where the domain controller will be installed. There is no –sitename argument when you run Install-ADDSForest because the first site created is Default-First-Site-Name.The site name must already exist when provided as an argument to -sitename. The cmdlet will not create the site.SkipAutoConfigureDNSSkips automatic configuration of DNS client settings, forwarders, and root hints. This argument is in effect only if the DNS Server service is already installed or automatically installed with -InstallDNS.SystemKey <string>Specifies the system key for the media from which you replicate the data.The default is none.Data must be in format provided by read-host -assecurestring or ConvertTo-SecureString.SysvolPath <string>Specifies the fully qualified, non-UNC path to a directory on a fixed disk of the local computer, for example, C:\Windows\SYSVOL.The default is %SYSTEMROOT%\SYSVOL.SYSVOL cannot be stored on a data volume formatted with Resilient File System (ReFS).SkipPreChecksDoes not run the prerequisite checks before starting installation. It is not advisable to use this setting.WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.Specifying Windows PowerShell CredentialsYou can specify credentials without revealing them in plain text on screen by using Get-credentialhttps://technet.microsoft.com/library/dd315327.aspx.The operation for the -SafeModeAdministratorPassword and LocalAdministratorPassword arguments is special:If not specified as an argument, the cmdlet prompts you to enter and confirm a masked password. This is the preferred usage when running the cmdlet interactively.If specified with a value, the value must be a secure string. This is not the preferred usage when running the cmdlet interactively.For example, you can manually prompt for a password by using the Read-Host cmdlet to prompt the user for a secure string-safemodeadministratorpassword (read-host -prompt "DSRM Password:" -assecurestring)As the previous option does not confirm the password, use extreme caution: the password is not visible.You can also provide a secure string as a converted clear-text variable, although this is highly discouraged:-safemodeadministratorpassword (convertto-securestring "Password1" -asplaintext -force)Providing or storing a clear text password is not recommended. Anyone running this command in a script or looking over your shoulder knows the DSRM password of that domain controller. With that knowledge, they can impersonate the domain controller itself and elevate their privilege to the highest level in an Active Directory forest.Using test cmdletsEach ADDSDeployment cmdlet has a corresponding test cmdlet. The test cmdlets runs only the prerequisite checks for the installation operation; no installation settings are configured. The arguments for each test cmdlet are the same as for the corresponding installation cmdlet, but –SkipPreChecks is not available for test cmdlets.Test cmdlet DescriptionTest-ADDSForestInstallationRuns the prerequisites for installing a new Active Directory forest.Test-ADDSDomainInstallationRuns the prerequisites for installing a new domain in Active Directory.Test-ADDSDomainControllerInstallationRuns the prerequisites for installing a domain controller in Active Directory.Test-ADDSReadOnlyDomainControllerAccountCreationRuns the prerequisites for adding a read-only domain controller (RODC) account.Installing a new forest root domain using Windows PowerShellThe command syntax for installing a new forest is as follows. Optional arguments appear within square brackets.Install-ADDSForest [-SkipPreChecks] –DomainName <string> -SafeModeAdministratorPassword <SecureString> [-CreateDNSDelegation] [-DatabasePath <string>] [-DNSDelegationCredential <PS Credential>] [-NoDNSOnNetwork] [-DomainMode <DomainMode> {Win2003 | Win2008 | Win2008R2 | Win2012}] [-DomainNetBIOSName <string>] [-ForestMode <ForestMode> {Win2003 | Win2008 | Win2008R2 | Win2012}] [-InstallDNS] [-LogPath <string>] [-NoRebootOnCompletion] [-SkipAutoConfigureDNS] [-SYSVOLPath] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]The -DomainNetBIOSName argument is required if you want to change the 15-character name that is automatically generated based on the DNS domain name prefix or if the name exceeds 15 characters.For example, to install a new forest named corp.contoso.com and be securely prompted to provide the DSRM password, type: Install-ADDSForest –domainname "corp.contoso.com" DNS server is installed by default when you run Install-ADDSForest.To install a new forest named corp.contoso.com, create a DNS delegation in the contoso.com domain, set domain functional level to Windows Server 2008 R2 and set forest functional level to Windows Server 2008, install the Active Directory database and SYSVOL on the D:\ drive, install the log files on the E:\ drive, and be prompted to provide the Directory Services Restore Mode password and type:Install-ADDSForest –DomainName corp.contoso.com –CreateDNSDelegation –DomainMode Win2008 –ForestMode Win2008R2 –DatabasePath "d:\NTDS" –SYSVOLPath "d:\SYSVOL" –LogPath "e:\Logs" Installing a new child or tree domain using Windows PowerShellThe command syntax for installing a new domain is as follows. Optional arguments appear within square brackets.Install-ADDSDomain [-SkipPreChecks] –NewDomainName <string> -ParentDomainName <string> -SafeModeAdministratorPassword <SecureString> [-ADPrepCredential <PS Credential>] [-AllowDomainReinstall] [-CreateDNSDelegation] [-Credential <PS Credential>] [-DatabasePath <string>] [-DNSDelegationCredential <PS Credential>] [-NoDNSOnNetwork] [-DomainMode <DomainMode> {Win2003 | Win2008 | Win2008R2 | Win2012}] [DomainType <DomainType> {Child Domain | TreeDomain} [-InstallDNS] [-LogPath <string>] [-NoGlobalCatalog] [-NewDomainNetBIOSName <string>] [-NoRebootOnCompletion] [-ReplicationSourceDC <string>] [-SiteName <string>] [-SkipAutoConfigureDNS] [-Systemkey <SecureString>] [-SYSVOLPath] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]The -credential argument is only required when you are not currently logged on as a member of the Enterprise Admins group.The -NewDomainNetBIOSName argument is required if you want to change the automatically generated 15-character name based on the DNS domain name prefix or if the name exceeds 15 characters.For example, to use credentials of corp\EnterpriseAdmin1 to create a new child domain named child.corp.contoso.com, install DNS server, create a DNS delegation in the corp.contoso.com domain, set domain functional level to Windows Server 2003, make the domain controller a global catalog server in a site named Houston, use DC1.corp.contoso.com as the replication source domain controller, install the Active Directory database and SYSVOL on the D:\ drive, install the log files on the E:\ drive, and be prompted to provide the Directory Services Restore Mode password but not prompted to confirm the command, type:Install-ADDSDomain –SafeModeAdministratorPassword –credential (get-credential corp\EnterpriseAdmin1) –NewDomainName child –ParentDomainName corp.contoso.com –InstallDNS –CreateDNSDelegation –DomainMode Win2003 –ReplicationSourceDC DC1.corp.contoso.com –SiteName Houston –DatabasePath "d:\NTDS" –SYSVOLPath "d:\SYSVOL" –LogPath "e:\Logs" –Confirm:$FalseInstalling an additional (replica) domain controller using Windows PowerShellThe command syntax for installing an additional domain controller is as follows. Optional arguments appear within square brackets.Install-ADDSDomainController -DomainName <string> [-SkipPreChecks] –SafeModeAdministratorPassword <SecureString> [-ADPrepCredential <PS Credential>] [-AllowDomainControllerReinstall] [-ApplicationPartitionsToReplicate <string[]>] [-CreateDNSDelegation] [-Credential <PS Credential>] [-CriticalReplicationOnly] [-DatabasePath <string>] [-DNSDelegationCredential <PS Credential>] [-NoDNSOnNetwork] [-NoGlobalCatalog] [-InstallationMediaPath <string>] [-InstallDNS] [-LogPath <string>] [-MoveInfrastructureOperationMasterRoleIfNecessary] [-NoRebootOnCompletion] [-ReplicationSourceDC <string>] [-SiteName <string>] [-SkipAutoConfigureDNS] [-SystemKey <SecureString>] [-SYSVOLPath <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]To install a domain controller and DNS server in the corp.contoso.com domain and be prompted to supply the domain Administrator credentials and the DSRM password, type: Install-ADDSDomainController -credential (get-credential corp\administrator) -domainname "corp.contoso.com" If the computer is already domain joined and you are a member of the Domain Admins group, you can use:Install-ADDSDomainController -domainname "corp.contoso.com"To be prompted for the domain name, type:Install-ADDSDomainController -credential (get-credential) -domainname (read-host "Domain to promote into")The following command will use credentials of Contoso\EnterpriseAdmin1 to install a writable domain controller and a global catalog server in a site named Boston, install DNS server, create a DNS delegation in the contoso.com domain, install from media that is stored in the c:\ADDS IFM folder, install the Active Directory database and SYSVOL on the D:\ drive, install the log files on the E:\ drive, have the server automatically restart after AD DS installation is complete, and be prompted to provide the Directory Services Restore Mode password:Install-ADDSDomainController –Credential (get-credential contoso\EnterpriseAdmin1) –CreateDNSDelegation –DomainName corp.contoso.com –SiteName Boston –InstallationMediaPath "c:\ADDS IFM" –DatabasePath "d:\NTDS" –SYSVOLPath "d:\SYSVOL" –LogPath "e:\Logs" Performing a staged RODC installation using Windows PowerShellThe command syntax to create an RODC account is as follows. Optional arguments appear within square brackets.Add-ADDSReadOnlyDomainControllerAccount [-SkipPreChecks] –DomainControllerAccuntName <string> -DomainName <string> -SiteName <string> [-AllowPasswordReplicationAccountName <string []>] [-NoGlobalCatalog] [-Credential <PS Credential>] [-DelegatedAdministratorAccountName <string>] [-DenyPasswordReplicationAccountName <string []>] [-InstallDNS] [-ReplicationSourceDC <string>] [-Force] [-WhatIf] [-Confirm] [<Common Parameters>]The command syntax to attach a server to an RODC account is as follows. Optional arguments appear within square brackets.Install-ADDSDomainController -DomainName <string> [-SkipPreChecks] –SafeModeAdministratorPassword <SecureString> [-ADPrepCredential <PS Credential>] [-ApplicationPartitionsToReplicate <string[]>] [-Credential <PS Credential>] [-CriticalReplicationOnly] [-DatabasePath <string>] [-NoDNSOnNetwork] [-InstallationMediaPath <string>] [-InstallDNS] [-LogPath <string>] [-MoveInfrastructureOperationMasterRoleIfNecessary] [-NoRebootOnCompletion] [-ReplicationSourceDC <string>] [-SkipAutoConfigureDNS] [-SystemKey <SecureString>] [-SYSVOLPath <string>] [-UseExistingAccount] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]For example, to create an RODC account named RODC1: Add-ADDSReadOnlyDomainControllerAccount –DomainControllerAccountName RODC1 –DomainName corp.contoso.com –SiteName Boston DelegatedAdministratoraccountName PilarAThen run the following commands on the server that you want to attach to the RODC1 account. The server cannot be joined to the domain. First, install the AD DS server role and management tools:install-windowsfeature –name AD-Domain-Services -includemanagementtoolsThe run the following command to create the RODC:Install-ADDSDomainController –DomainName corp.contoso.com –SafeModeAdministratorPassword (read-host –prompt "DSRM Password:" –assecurestring) –credential (get-credential Corp\PilarA) -useexistingaccountPress Y to confirm or include the –confirm argument to prevent the confirmation prompt.Installing AD DS by using Server ManagerAD DS can be installed in Windows Server 2012 by using the Add Roles Wizard in Server Manager, followed by the Active Directory Domain Services Configuration Wizard, which is new beginning in Windows Server 2012. The Active Directory Domain Services Installation Wizard (dcpromo.exe) is deprecated beginning in Windows Server 2012.The following sections explain how to create server pools in order to install and manage AD DS on multiple servers, and how to use the wizards to install AD DS.Creating server poolsServer Manager can pool other servers on the network as long as they are accessible from the computer running Server Manager. Once pooled, you choose those servers for remote installation of AD DS or any other configuration options possible within Server Manager. The computer running Server Manager automatically pools itself. For more information about server pools, see Add Servers to Server Managerhttps://technet.microsoft.com/library/hh831453.aspx.In order to manage a domain-joined computer using Server Manager on a workgroup server, or vice-versa, additional configuration steps are needed. For more information, see “Add and manage servers in workgroups” in Add Servers to Server Managerhttps://technet.microsoft.com/library/hh831453.aspx.Installing AD DSAdministrative credentialsThe credential requirements to install AD DS vary depending on which deployment configuration you choose. For more information, see Credential requirements to run Adprep.exe and install Active Directory Domain Services.Use the following procedures to install AD DS using the GUI method. The steps can be performed locally or remotely. For more detailed explanation of these steps, see the following topics:Deploying a Forest with Server Manager Upgrade Existing AD DS Forests and Add Writable Replica Domain Controllers Create Child and Tree Domains Stage and Attach RODCs, Create RODCs without Staging To install AD DS by using Server ManagerIn Server Manager, click Manage and click Add Roles and Features to start the Add Roles Wizard.On the Before you begin page, click Next.On the Select installation type page, click Role-based or feature-based installation and then click Next.On the Select destination server page, click Select a server from the server pool, click the name of the server where you want to install AD DS and then click Next.To select remote servers, first create a server pool and add the remote servers to it. For more information about creating server pools, see Add Servers to Server Managerhttps://technet.microsoft.com/library/hh831453.aspx.On the Select server roles page, click Active Directory Domain Services, then on the Add Roles and Features Wizard dialog box, click Add Features, and then click Next.On the Select features page, select any additional features you want to install and click Next.On the Active Directory Domain Services page, review the information and then click Next.On the Confirm installation selections page, click Install.On the Results page, verify that the installation succeeded, and click Promote this server to a domain controller to start the Active Directory Domain Services Configuration Wizard.If you close Add Roles Wizard at this point without starting the Active Directory Domain Services Configuration Wizard, you can restart it by clicking Tasks in Server Manager.On the Deployment Configuration page, choose one of the following options: If you are installing an additional domain controller in an existing domain, click Add a domain controller to an existing domain, and type the name of the domain (for example, emea.corp.contoso.com) or click Select… to choose a domain, and credentials (for example, specify an account that is a member of the Domain Admins group) and then click Next.The name of the domain and current user credentials are supplied by default only if the machine is domain-joined and you are performing a local installation. If you are installing AD DS on a remote server, you need to specify the credentials, by design. If current user credentials are not sufficient to perform the installation, click Change… in order to specify different credentials.For more information, see Install a Replica Windows Server 2012 Domain Controller in an Existing Domain (Level 200).If you are installing a new child domain, click Add a new domain to an existing forest, for Select domain type, select Child Domain, type or browse to the name of the parent domain DNS name (for example, corp.contoso.com), type the relative name of the new child domain (for example emea), type credentials to use to create the new domain, and then click Next.For more information, see Install a New Windows Server 2012 Active Directory Child or Tree Domain (Level 200).If you are installing a new domain tree, click Add new domain to an existing forest, for Select domain type, choose Tree Domain, type the name of the root domain (for example, corp.contoso.com), type the DNS name of the new domain (for example, fabrikam.com), type credentials to use to create the new domain, and then click Next.For more information, see Install a New Windows Server 2012 Active Directory Child or Tree Domain (Level 200).If you are installing a new forest, click Add a new forest and then type the name of the root domain (for example, corp.contoso.com).For more information, see Install a New Windows Server 2012 Active Directory Forest (Level 200).On the Domain Controller Options page, choose one of the following options: If you are creating a new forest or domain, select the domain and forest functional levels, click Domain Name System (DNS) server, specify the DSRM password, and then click Next.If you are adding a domain controller to an existing domain, click Domain Name System (DNS) server, Global Catalog (GC), or Read Only Domain Controller (RODC) as needed, choose the site name, and type the DSRM password and then click Next.For more information about which options on this page are available or not available under different conditions, see Domain Controller Options.On the DNS Options page (which appears only if you install a DNS server), click Update DNS delegation as needed. If you do, provide credentials that have permission to create DNS delegation records in the parent DNS zone.If a DNS server that hosts the parent zone cannot be contacted, the Update DNS Delegation option is not available.For more information about whether you need to update the DNS delegation, see Understanding Zone Delegationhttps://technet.microsoft.com/library/cc771640.aspx. If you attempt to update the DNS delegation and encounter an error, see DNS Options.On the RODC Options page (which appears only if you install an RODC), specify the name of a group or user who will manage the RODC, add accounts to or remove accounts from the Allowed or Denied password replication groups, and then click Next.For more information, see Password Replication Policyhttps://technet.microsoft.com/library/cc730883(v=ws.10).On the Additional Options page, choose one of the following options: If you are creating a new domain, type a new NetBIOS name or verify the default NetBIOS name of the domain, and then click Next.If you are adding a domain controller to an existing domain, select the domain controller that you want to replicate the AD DS installation data from (or allow the wizard to select any domain controller). If you are installing from media, click Install from media path type and verify the path to the installation source files, and then click Next.You cannot use install from media (IFM) to install the first domain controller in a domain. IFM does not work across different operating system versions. In other words, in order to install an additional domain controller that runs Windows Server 2012 by using IFM, you must create the backup media on a Windows Server 2012 domain controller. For more information about IFM, see Installing an Additional Domain Controller by Using IFMhttps://technet.microsoft.com/library/cc816722(WS.10).aspx.On the Paths page, type the locations for the Active Directory database, log files, and SYSVOL folder (or accept default locations), and click Next.Do not store the Active Directory database, log files, or SYSVOL folder on a data volume formatted with Resilient File System (ReFS).On the Preparation Options page, type credentials that are sufficient to run adprep. For more information, see Credential requirements to run Adprep.exe and install Active Directory Domain Services.On the Review Options page, confirm your selections, click View script if you want to export the settings to a Windows PowerShell script, and then click Next.On the Prerequisites Check page, confirm that prerequisite validation completed and then click Install.On the Results page, verify that the server was successfully configured as a domain controller. The server will be restarted automatically to complete the AD DS installation.Performing a Staged RODC Installation using the Graphical User InterfaceA staged RODC installation allows you to create an RODC in two stages. In the first stage, a member of the Domain Admins group creates an RODC account. In the second stage, a server is attached to the RODC account. The second stage can be completed by a member of the Domain Admins group or a delegated domain user or group.To create an RODC account by using the Active Directory management toolsYou can create the RODC account using Active Directory Administrative Center or Active Directory Users and Computers.Click Start, click Administrative Tools, and then click Active Directory Administrative Center.In the navigation pane (left pane), click the name of the domain.In the Management list (center pane), click the Domain Controllers OU.In the Tasks Pane (right pane), click Pre-create a read-only domain controller account.-Or-Click Start, click Administrative Tools, and then click Active Directory Users and Computers.Either right-click the Domain Controllers organizational unit (OU) or click the Domain Controllers OU, and then click Action.Click Pre-create Read-only Domain Controller account.On the Welcome to the Active Directory Domain Services Installation Wizard page, if you want to modify the default the Password Replication Policy (PRP), select Use advanced mode installation, and then click Next.On the Network Credentials page, under Specify the account credentials to use to perform the installation, click My current logged on credentials or click Alternate credentials, and then click Set. In the Windows Security dialog box, provide the user name and password for an account that can install the additional domain controller. To install an additional domain controller, you must be a member of the Enterprise Admins group or the Domain Admins group. When you are finished providing credentials, click Next.On the Specify the Computer Name page, type the computer name of the server that will be the RODC.On the Select a Site page, select a site from the list or select the option to install the domain controller in the site that corresponds to the IP address of the computer on which you are running the wizard, and then click Next.On the Additional Domain Controller Options page, make the following selections, and then click Next:DNS server: This option is selected by default so that your domain controller can function as a Domain Name System (DNS) server. If you do not want the domain controller to be a DNS server, clear this option. However, if you do not install the DNS server role on the RODC and the RODC is the only domain controller in the branch office, users in the branch office will not be able to perform name resolution when the wide area network (WAN) to the hub site is offline.Global catalog: This option is selected by default. It adds the global catalog, read-only directory partitions to the domain controller, and it enables global catalog search functionality. If you do not want the domain controller to be a global catalog server, clear this option. However, if you do not install a global catalog server in the branch office or enable universal group membership caching for the site that includes the RODC, users in the branch office will not be able to log on to the domain when the WAN to the hub site is offline.Read-only domain controller. When you create an RODC account, this option is selected by default and you cannot clear it.If you selected the Use advanced mode installation check box on the Welcome page, the Specify the Password Replication Policy page appears. By default, no account passwords are replicated to the RODC, and security-sensitive accounts (such as members of the Domain Admins group) are explicitly denied from ever having their passwords replicated to the RODC.To add other accounts to policy, click Add, then click Allow passwords for the account to replicate to this RODC or click Deny passwords for the account from replicating to this RODC and then select the accounts.When complete (or to accept the default setting), click Next.On the Delegation of RODC Installation and Administration page, type the name of the user or the group who will attach the server to the RODC account that you are creating. You can type the name of only one security principal.To search the directory for a specific user or group, click Set. In Select User or Group, type the name of the user or group. We recommend that you delegate RODC installation and administration to a group.This user or group will also have local administrative rights on the RODC after the installation. If you do not specify a user or group, only members of the Domain Admins group or the Enterprise Admins group will be able to attach the server to the account.When you are finished, click Next.On the Summary page, review your selections. Click Back to change any selections, if necessary.To save the settings that you selected to an answer file that you can use to automate subsequent AD DS operations, click Export settings. Type a name for your answer file, and then click Save.When you are sure that your selections are accurate, click Next to create the RODC account.On the Completing the Active Directory Domain Services Installation Wizard page, click Finish.After an RODC account is created, you can attach a server to account to complete the RODC installation. This second stage can be completed in the branch office where the RODC will be located. The server where you perform this procedure must not be joined to the domain. Beginning in Windows Server 2012, you use the Add Roles Wizard in Server Manager to attach a server to an RODC account.To attach a server to an RODC account using Server ManagerLog on as local Administrator.In Server Manager, click Add roles and features.On the Before you begin page, click Next.On the Select installation type page, click Role-based or feature-based installation and then click Next.On the Select destination server page, click Select a server from the server pool, click the name of the server where you want to install AD DS and then click Next.On the Select server roles page, click Active Directory Domain Services, click Add Features and then click Next.On the Select features page, select any additional features that you want to install and click Next.On the Active Directory Domain Services page, review the information and then click Next.On the Confirm installation selections page, click Install.On the Results page, verify Installation succeeded, and click Promote this server to a domain controller to start the Active Directory Domain Services Configuration Wizard.If you close Add Roles Wizard at this point without starting the Active Directory Domain Services Configuration Wizard, you can restart it by clicking Tasks in Server Manager.On the Deployment Configuration page, click Add a domain controller to an existing domain, type the name of the domain (for example, emea.contoso.com) and credentials (for example, specify an account that is delegated to manage and install the RODC), and then click Next.On the Domain Controller Options page, click Use existing RODC account, type and confirm the Directory Services Restore Mode password, and then click Next.On the Additional Options page, if you are installing from media, click Install from media path type and verify the path to the installation source files, select the domain controller that you want to replicate the AD DS installation data from (or allow the wizard to select any domain controller) and then click Next.On the Paths page, type the locations for the Active Directory database, log files, and SYSVOL folder, or accept default locations, and then click Next.On the Review Options page, confirm your selections, click View Script to export the settings to a Windows PowerShell script, and then click Next.On the Prerequisites Check page, confirm that prerequisite validation completed and then click Install.To complete the AD DS installation, the server will restart automatically.Troubleshooting Domain Controller Deployment Install a New Windows Server 2012 Active Directory Forest (Level 200) Install a New Windows Server 2012 Active Directory Child or Tree Domain (Level 200) Install a Replica Windows Server 2012 Domain Controller in an Existing Domain (Level 200)