forked from dsccommunity/ActiveDirectoryDsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2-ADKDSKey_CreateKDSRootKeyInPast_Config.ps1
38 lines (34 loc) · 1.14 KB
/
2-ADKDSKey_CreateKDSRootKeyInPast_Config.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<#PSScriptInfo
.VERSION 1.0.1
.GUID c3e0fb1e-d583-45ed-b95d-e7df1afa88b7
.AUTHOR DSC Community
.COMPANYNAME DSC Community
.COPYRIGHT DSC Community contributors. All rights reserved.
.TAGS DSCConfiguration
.LICENSEURI https://github.com/dsccommunity/ActiveDirectoryDsc/blob/main/LICENSE
.PROJECTURI https://github.com/dsccommunity/ActiveDirectoryDsc
.ICONURI https://dsccommunity.org/images/DSC_Logo_300p.png
.RELEASENOTES
Updated author, copyright notice, and URLs.
#>
#Requires -Module ActiveDirectoryDsc
<#
.DESCRIPTION
This configuration will create a KDS root key in the past. This will allow
the key to be used right away, but if all the domain controllers haven't
replicated yet, there may be issues when retrieving the gMSA password.
Use with caution
#>
Configuration ADKDSKey_CreateKDSRootKeyInPast_Config
{
Import-DscResource -Module ActiveDirectoryDsc
Node localhost
{
ADKDSKey 'ExampleKDSRootKeyInPast'
{
Ensure = 'Present'
EffectiveTime = '1/1/1999 13:00'
AllowUnsafeEffectiveTime = $true # Use with caution
}
}
}