Last active
March 29, 2022 16:20
-
-
Save epjuan21/0d9c5354cb34d82d53406797e07fe59b to your computer and use it in GitHub Desktop.
Instalar Rol Active Directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################ | |
### ### | |
### Instalar Rol de Active Directory Domain Services ### | |
### ### | |
############################################################ | |
Install-WindowsFeature AD-Domain-Services -IncludeAllSubFeature -IncludeManagementTools | |
# Agregar Caracteristicas Adicionales | |
Add-WindowsFeature -Name DNS -IncludeAllSubFeature -IncludeManagementTools | |
### __ Promover Servidor a Domain Controller ___ ### | |
### ________________________________________________ ### | |
## | |
## Variables Domain Controller | |
## ______________________________________________ | |
$DomainName = "hospital.local" | |
$NetBiosName = "hospital" | |
$Password = "XXXXXXXX" | |
Import-Module ADDSDeployment | |
Install-ADDSForest ` | |
-CreateDnsDelegation:$false ` | |
-DatabasePath "C:\Windows\NTDS" ` | |
-DomainMode Win2012R2 ` | |
-DomainName $DomainName ` | |
-DomainNetbiosName $NetBiosName ` | |
-ForestMode Win2012R2 ` | |
-InstallDns:$true ` | |
-LogPath "C:\Windows\NTDS" ` | |
-NoRebootOnCompletion:$false ` | |
-SysvolPath "C:\Windows\SYSVOL" ` | |
-SafeModeAdministratorPassword (ConvertTo-SecureString -AsPlainText $Password -Force) ` | |
-Force:$true | |
### __ Verificar Carpetas Compartidas ___ ### | |
### ________________________________________________ ### | |
## ---------------------------------------------- | |
## Usar el Comando Get-SmbShare | |
## ---------------------------------------------- | |
### __ Verificar Confianza Entre Dcs ___ ### | |
### ________________________________________________ ### | |
## ---------------------------------------------- | |
## Usar el Comando Get-ADTrust -Filter * | ogv | |
## ---------------------------------------------- | |
### __ Verificar Roles FSMO ___ ### | |
### ________________________________________________ ### | |
## -------------------------------------------------------------------------------------------------------------------------------- | |
## Usar el Comando Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator | |
## Usar el Comando Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster | |
## Usar el Comando Get-ADDomainController -Service PrimaryDC -Discover | |
## Usar el Comando Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | ft -AutoSize | |
## -------------------------------------------------------------------------------------------------------------------------------- | |
### __ Habilitar Papelera de Reciclaje de Active Directory ___ ### | |
### _____________________________________________________________________ ### | |
Enable-ADOptionalFeature "Recycle Bin Feature" -Scope ForestOrConfigurationSet -Target $DomainName -Confirm:$false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment