Last active
August 29, 2015 14:18
-
-
Save mgreenegit/a2fae38e38607399e5e4 to your computer and use it in GitHub Desktop.
Configuration to build a DC/CA
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
Configuration CA | |
{ | |
param ( | |
[Parameter(Mandatory=$true)] | |
[ValidateNotNullorEmpty()] | |
[PsCredential] $credential | |
) | |
Import-DSCResource -module xAdcsDeployment | |
Node 'localhost' | |
{ | |
WindowsFeature ADCS-Cert-Authority | |
{ | |
Ensure = 'Present' | |
Name = 'ADCS-Cert-Authority' | |
} | |
xADCSCertificationAuthority ADCS | |
{ | |
Ensure = 'Present' | |
Credential = $credential | |
CAType = 'EnterpriseRootCA' | |
DependsOn = '[WindowsFeature]ADCS-Cert-Authority' | |
} | |
} | |
} | |
$configData = @{ | |
AllNodes = @( | |
@{ | |
NodeName = 'localhost'; | |
PSDscAllowPlainTextPassword = $true | |
} | |
) | |
} | |
CA -ConfigurationData $configData -credential (get-credential) -OutputPath 'C:\CAConfig\' | |
Start-DscConfiguration -Wait -Force -Verbose -Path 'C:\CAConfig\' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment