-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbreaching-defenses_lab0.ps1
33 lines (24 loc) · 1.81 KB
/
breaching-defenses_lab0.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
#--------------------------------------------------------------------------------------------------------------------
# Setting up the breaching-Defenses.com lab
#--------------------------------------------------------------------------------------------------------------------
$labName = 'BreachingDefensesLab0' #the name of the lab
#--------------------------------------------------------------------------------------------------------------------
Write-ScreenInfo -Message 'Prepare resources' -TaskStart
. $PSScriptRoot\utils.ps1 -labName $labName
Write-ScreenInfo -Message 'Finished' -TaskEnd
#--------------------------------------------------------------------------------------------------------------------
# Set the credentials
#--------------------------------------------------------------------------------------------------------------------
Add-LabDomainDefinition -Name $domain -AdminUser $AdminUser -AdminPassword $AdminPassword
#--------------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------------
# Forest breachdefs.com
#--------------------------------------------------------------------------------------------------------------------
# the domain controller of the first forest
Add-LabMachineDefinition -Name DC1 -ResourceName 0-DC1 -IpAddress 192.168.57.10 -Roles $roleDCOnlyForest -PostInstallationActivity $roleBadBlood
#--------------------------------------------------------------------------------------------------------------------
Install-Lab
Write-ScreenInfo -Message 'Install Tools' -TaskStart
. $PSScriptRoot\tools.ps1 -labSource $labSources
Write-ScreenInfo -Message 'Finished' -TaskEnd
Checkpoint-LabVM -All -SnapshotName 'FirstSnapshot'