Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit 1a1ec18

Browse files
author
Jason Helmick
committed
Final tests pass
1 parent 4deb4b6 commit 1a1ec18

35 files changed

+3291
-811
lines changed

Configurations/POC-MultiRole/VMConfiguration.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ $credential = New-Object -typename Pscredential -ArgumentList Administrator, $se
339339
ValueType = 'Dword'
340340
ValueData = '0'
341341
Ensure = 'Present'
342-
DependsOn = '[xWaitForADDomain]DSCForestWait'
343342
}
344343
foreach ($Rule in @(
345344
'RemoteDesktop-UserMode-In-TCP',

Configurations/TEST-SingleServer/VMConfiguration.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,9 @@ $credential = New-Object -typename Pscredential -ArgumentList Administrator, $se
346346
'RemoteDesktop-Shadow-In-TCP'
347347
)) {
348348
xFirewall $Rule {
349-
Name = $Rule.name
349+
Name = $Rule
350350
Enabled = 'True'
351+
DependsOn = '[Registry]RDP'
351352
}
352353
} # End RDP
353354
}

Configurations/TEST-SingleServer/VMConfigurationData.psd1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ demonstrations and would need to be modified for your environment.
127127
Lability_BootOrder = 20
128128
Lability_timeZone = 'US Mountain Standard Time' #[System.TimeZoneInfo]::GetSystemTimeZones()
129129
Lability_Media = '2016_x64_Standard_EN_Eval'
130+
Lability_StartupMemory = 4GB
130131
Lability_MinimumMemory = 4GB
131132
}
132133
<#

Configurations/devops-powershell-fundamentals/VMConfiguration.ps1

Lines changed: 469 additions & 32 deletions
Large diffs are not rendered by default.

Configurations/devops-powershell-fundamentals/VMConfigurationData.psd1

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<# Notes:
22
3-
Authors: Jason Helmick and Melissa (Missy) Janusko
3+
Authors: Jason Helmick and Melissa (Missy) Januszko
44
55
The bulk of this DC, DHCP, ADCS config is authored by Melissa (Missy) Januszko and Jason Helmick.
66
Currently on her public DSC hub located here: https://github.com/majst32/DSC_public.git
@@ -32,6 +32,13 @@ demonstrations and would need to be modified for your environment.
3232
IPNetwork = '192.168.3.0/24'
3333
IPNatName = 'LabNat'
3434
DnsServerAddress = '192.168.3.10'
35+
36+
# Firewall settings to enable
37+
FirewallRuleNames = @(
38+
'FPS-ICMP4-ERQ-In';
39+
'FPS-ICMP6-ERQ-In';
40+
'FPS-SMB-In-TCP'
41+
)
3542

3643
# Domain and Domain Controller information
3744
DomainName = "Company.Pri"
@@ -54,10 +61,22 @@ demonstrations and would need to be modified for your environment.
5461
DHCPDnsServerIPAddress = '192.168.3.10'
5562
DHCPRouter = '192.168.3.1'
5663

64+
# ADCS Certificate Services information
65+
CACN = 'Company.Pri'
66+
CADNSuffix = "C=US,L=Phoenix,S=Arizona,O=Company"
67+
CADatabasePath = "C:\windows\system32\CertLog"
68+
CALogPath = "C:\CA_Logs"
69+
ADCSCAType = 'EnterpriseRootCA'
70+
ADCSCryptoProviderName = 'RSA#Microsoft Software Key Storage Provider'
71+
ADCSHashAlgorithmName = 'SHA256'
72+
ADCSKeyLength = 2048
73+
ADCSValidityPeriod = 'Years'
74+
ADCSValidityPeriodUnits = 2
75+
5776
# Lability default node settings
5877
Lability_SwitchName = 'LabNet'
5978
Lability_ProcessorCount = 1
60-
Lability_StartupMemory = 1GB
79+
Lability_MinimumMemory = 1GB
6180
SecureBoot = $false
6281
Lability_Media = '2016_x64_Standard_Core_EN_Eval' # Can be Core,Win10,2012R2,nano
6382
# 2016_x64_Standard_EN_Eval
@@ -74,14 +93,24 @@ demonstrations and would need to be modified for your environment.
7493
# WIN10_x64_Enterprise_EN_Eval
7594
}
7695

96+
<# Available Roles for computers
97+
DC = Domain Controller
98+
DHCP = Dynamic Host Configuration Protocol
99+
ADCS = Active Directory Certificate SErvices - plus autoenrollment GPO's and DSC and web server certs
100+
Web = Basic web server
101+
RSAT = Remote Server Administration Tools for the client
102+
RDP = enables RDP and opens up required firewall rules
103+
DomainJoin = joions a computer to the domain
104+
#>
77105
@{
78106
NodeName = 'DC1'
79107
IPAddress = '192.168.3.10'
80-
Role = 'DC' # multiple roles @('DC', 'DHCP')
108+
Role = @('DC', 'DHCP', 'ADCS')
81109
Lability_BootOrder = 10
82110
Lability_BootDelay = 60 # Number of seconds to delay before others
83111
Lability_timeZone = 'US Mountain Standard Time' #[System.TimeZoneInfo]::GetSystemTimeZones()
84-
Lability_StartupMemory = 2GB
112+
Lability_Media = '2016_x64_Standard_Core_EN_Eval'
113+
Lability_MinimumMemory = 2GB
85114
Lability_ProcessorCount = 2
86115
CustomBootStrap = @'
87116
# This must be set to handle larger .mof files
@@ -92,19 +121,24 @@ demonstrations and would need to be modified for your environment.
92121
@{
93122
NodeName = 'S1'
94123
IPAddress = '192.168.3.50'
95-
Role = 'DomainJoin' # example of multiple roles @('DomainJoin', 'Web')
96-
Lability_BootOrder = 20
124+
#Role = 'DomainJoin' # example of multiple roles @('DomainJoin', 'Web')
125+
Role = @('DomainJoin')
126+
Lability_BootOrder = 20
97127
Lability_timeZone = 'US Mountain Standard Time' #[System.TimeZoneInfo]::GetSystemTimeZones()
128+
Lability_Media = '2016_x64_Standard_Core_EN_Eval'
98129
}
99130

100131
@{
101132
NodeName = 'S2'
102133
IPAddress = '192.168.3.51'
103-
Role = 'DomainJoin' # example of multiple roles @('DomainJoin', 'Web')
104-
Lability_BootOrder = 20
134+
#Role = 'DomainJoin' # example of multiple roles @('DomainJoin', 'Web')
135+
Role = @('DomainJoin')
136+
Lability_BootOrder = 20
105137
Lability_timeZone = 'US Mountain Standard Time' #[System.TimeZoneInfo]::GetSystemTimeZones()
138+
Lability_Media = '2016_x64_Standard_Core_EN_Eval'
106139
}
107140

141+
108142
@{
109143
NodeName = 'N1'
110144
IPAddress = '192.168.3.60'
@@ -118,22 +152,19 @@ demonstrations and would need to be modified for your environment.
118152
@{
119153
NodeName = 'Cli1'
120154
IPAddress = '192.168.3.100'
121-
Role = @('domainJoin', 'RSAT')
155+
Role = @('domainJoin', 'RSAT', 'RDP')
122156
Lability_ProcessorCount = 2
123-
Lability_StartupMemory = 4GB
157+
Lability_MinimumMemory = 2GB
124158
Lability_Media = 'WIN10_x64_Enterprise_EN_Eval'
125159
Lability_BootOrder = 20
126160
Lability_timeZone = 'US Mountain Standard Time' #[System.TimeZoneInfo]::GetSystemTimeZones()
127161
Lability_Resource = @('Win10RSAT')
128162
CustomBootStrap = @'
129163
# To enable PSRemoting on the client
130164
Enable-PSRemoting -SkipNetworkProfileCheck -Force;
131-
# To enable RDP
132-
Set-ItemProperty -Path "HKLM:\System\ControlSet001\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0;
133-
134165
'@
135166
}
136-
167+
#>
137168

138169
);
139170
NonNodeData = @{
@@ -178,7 +209,6 @@ demonstrations and would need to be modified for your environment.
178209
@{ Name = 'xPendingReboot'; RequiredVersion = '0.3.0.0'; },
179210
@{ Name = 'xADCSDeployment'; RequiredVersion = '1.0.0.0'; }
180211

181-
182212
);
183213
Resource = @(
184214
@{

Configurations/devops-powershell-fundamentals/VMValidate.test.ps1

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ It "[DC1] Should have a computer account for S1" {
7171
$computer.name -contains "S1" | Should Be "True"
7272
}
7373

74-
It "[DC1] Should have a computer account for S2" {
75-
$computer.name -contains "S2" | Should Be "True"
76-
}
7774

7875

7976
} #DC
@@ -97,24 +94,6 @@ It "[S1] Should have a DNS server configuration of 192.168.3.10" {
9794
} #S1
9895

9996

100-
Describe S2 {
101-
$s2 = New-PSSession -VMName S2 -Credential $cred -ErrorAction SilentlyContinue
102-
It "Should accept domain admin credential" {
103-
$s2.Count | Should Be 1
104-
}
105-
106-
It "Should have an IP address of 192.168.3.51" {
107-
$i = Invoke-command -ScriptBlock { Get-NetIPAddress -interfacealias 'Ethernet' -AddressFamily IPv4} -Session $S2
108-
$i.ipv4Address | should be '192.168.3.51'
109-
}
110-
$dns = Invoke-Command {Get-DnsClientServerAddress -InterfaceAlias ethernet -AddressFamily IPv4} -session $s2
111-
It "Should have a DNS server configuration of 192.168.3.10" {
112-
$dns.ServerAddresses -contains '192.168.3.10' | Should Be "True"
113-
}
114-
115-
116-
} #S2
117-
11897
Describe NanoServer {
11998

12099
It "[Nano] Should respond to WSMan requests" {

0 commit comments

Comments
 (0)