Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. Configuration ADCSConfiguration{
  2. param(
  3. [PsCredential] $credential)
  4.  
  5. Import-DSCResource -ModuleName PSDesiredStateConfiguration
  6. Import-DSCResource -ModuleName xComputerManagement
  7. Import-DSCResource -ModuleName XAdcsDeployment
  8.  
  9. Node 'ADCSconf'{
  10. WindowsFeature ADCS-Cert-Authority{
  11. Ensure = 'Present'
  12. Name = 'ADCS-Cert-Authority'
  13. DependsOn = '[xComputer]Domain-join'
  14. }
  15. xADCSCertificationAuthority ADCS-Setup{
  16. Credential = $credential
  17. Ensure = 'Present'
  18. CAType = 'EnterpriseRootCA'
  19. HashAlgorithmName = 'SHA256'
  20. DependsOn = '[WindowsFeature]ADCS-Cert-Authority'
  21. }
  22. xComputer Domain-join{
  23. Name = 'test'
  24. DomainName = 'sharedhomelab.com'
  25. Credential = $credential
  26. }
  27. }
  28. }
  29.  
  30. $cd =@{
  31. AllNodes = @(
  32. @{
  33. NodeName = 'ADCSconf'
  34. PSDscAllowPlainTextPassword = $true
  35. PSDscAllowDomainUser = $true
  36. }
  37. )
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement