Skip to content

Commit bdab2ae

Browse files
committed
Add sleep
1 parent b83d4ce commit bdab2ae

File tree

4 files changed

+40
-2
lines changed

4 files changed

+40
-2
lines changed
120 Bytes
Binary file not shown.
120 Bytes
Binary file not shown.

Deploy-AD/DesiredSateConfig/src/Add-DC1-Services.ps1

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,31 @@ configuration ADD-DC1-Services {
3333
ConfigurationMode = 'ApplyOnly'
3434
RebootNodeIfNeeded = $true
3535
}
36+
37+
xScript DelayBeforeDNS
38+
{
39+
SetScript = {
40+
# Force a 30 second sleep
41+
Start-Sleep -seconds 30
42+
}
43+
44+
GetScript =
45+
{
46+
return @{ "Result" = "false" }
47+
}
48+
49+
TestScript =
50+
{
51+
return $false
52+
}
53+
}
3654

3755
# ***** Add DNS and AD Features *****
3856
WindowsFeature DNS
3957
{
40-
Ensure = "Present"
41-
Name = "DNS"
58+
Ensure = "Present"
59+
Name = "DNS"
60+
DependsOn = '[xScript]DelayBeforeDNS'
4261
}
4362

4463
Script EnableDNSDiags

Deploy-AD/DesiredSateConfig/src/Join-Domain.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,30 @@ configuration Join-Domain {
3333
RebootNodeIfNeeded = $true
3434
}
3535

36+
xScript DelayBeforeDNS
37+
{
38+
SetScript = {
39+
# Force a 30 second sleep
40+
Start-Sleep -seconds 30
41+
}
42+
43+
GetScript =
44+
{
45+
return @{ "Result" = "false" }
46+
}
47+
48+
TestScript =
49+
{
50+
return $false
51+
}
52+
}
53+
3654
DnsServerAddress SetDNS
3755
{
3856
Address = $DCIPAddress
3957
InterfaceAlias = $InterfaceAlias
4058
AddressFamily = 'IPv4'
59+
DependsOn = '[xScript]DelayBeforeDNS'
4160
}
4261

4362
# ***** Join Domain *****

0 commit comments

Comments
 (0)