automation

Azure Automation leveraging DSC is such a great configuration tool for keeping your Server Infrastructure in a consistent desired state

Below is a little PowerShell DSC Script, which will install all the relevant features for ADDS

Copy & save the below as a .ps1 – import into your DSC Configurations, Compile, Add the relevant DSC Nodes (VM’s) you wish to apply the DSC Config to, sit back and watch as your Nodes get ADDS features installed


configuration ADInstall
{ 
 
 Node localhost
 {

 WindowsFeature DNS 
 { 
 Ensure = "Present" 
 Name = "DNS"
 }

 WindowsFeature ADDSInstall 
 { 
 Ensure = "Present" 
 Name = "AD-Domain-Services"
 } 

 WindowsFeature ADDSTools 
 { 
 DependsOn= '[WindowsFeature]ADDSInstall'
 Ensure = "Present" 
 Name = "RSAT-ADDS" 
 IncludeAllSubFeature = $true 
 } 
 }
} 

 

 

 

Advertisements