diff --git a/Guests/SRV-01.ps1 b/Guests/SRV-01.ps1 index 8f77e36..11f2736 100644 --- a/Guests/SRV-01.ps1 +++ b/Guests/SRV-01.ps1 @@ -201,5 +201,14 @@ echo "Add local DNS for all Hosts" Get-DhcpServerv4Scope | Set-DhcpServerv4OptionValue -DnsServer 192.168.8.1 Get-DhcpServerv4Scope | Set-DhcpServerv4OptionValue -DnsServer 192.168.128.1 +# Install Active-Directory + +install-windowsfeature AD-Domain-Services -includemanagementtools -includeallsubfeature + +# Configure Active-Dir + +Install-ADDSForest -CreateDnsDelegation:$false -DatabasePath “C:\Windows\NTDS” -DomainMode “Win2016” -DomainName “localdomain” -DomainNetbiosName “ad.localdomain” -ForestMode “Win2016” -InstallDns:$false -LogPath “C:\Windows\NTDS” -NoRebootOnCompletion:$false -SysvolPath “C:\Windows\SYSVOL” -Force:$true + + Read-Host "Finished?" Restart-Computer diff --git a/Host/Create-ALL.ps1 b/Host/Create-ALL.ps1 index e8b0d5b..33944b5 100644 --- a/Host/Create-ALL.ps1 +++ b/Host/Create-ALL.ps1 @@ -29,7 +29,7 @@ Copy-item "${env:SCRIPTS_PATH}Guests\$vm_name.ps1" "${Drive}\Tools\scripts\boot. Dismount-VHD "$env:VHD_PATH$vm_name.vhdx" -New-VM -Name "$vm_name" -generation "$gen" -memorystartupbytes $mem +New-VM -Name "$vm_name" -generation "$gen" -memorystartupbytes $mem -VHDPath "$env:VHD_PATH$vm_name.vhdx" Set-VMHardDiskDrive -VMName "$vm_name" -Path "$env:VHD_PATH$vm_name.vhdx" -ControllerType SCSI Set-VMMemory "$vm_name" -DynamicMemoryEnabled $true -MinimumBytes $min_mem -StartupBytes $mem -MaximumBytes $max_mem Set-VM -Name "$vm_name" -ProcessorCount "$cpus" @@ -62,7 +62,7 @@ Copy-item "${env:SCRIPTS_PATH}Guests\$vm_name.ps1" "${Drive}\Tools\scripts\boot. Dismount-VHD "$env:VHD_PATH$vm_name.vhdx" -New-VM -Name "$vm_name" -generation "$gen" -memorystartupbytes $mem +New-VM -Name "$vm_name" -generation "$gen" -memorystartupbytes $mem -VHDPath "$env:VHD_PATH$vm_name.vhdx" Set-VMHardDiskDrive -VMName "$vm_name" -Path "$env:VHD_PATH$vm_name.vhdx" -ControllerType SCSI Set-VMMemory "$vm_name" -DynamicMemoryEnabled $true -MinimumBytes $min_mem -StartupBytes $mem -MaximumBytes $max_mem Set-VM -Name "$vm_name" -ProcessorCount "$cpus" @@ -97,7 +97,7 @@ Copy-item "${env:SCRIPTS_PATH}Guests\$vm_name.ps1" "${Drive}\Tools\scripts\boot. Dismount-VHD "$env:VHD_PATH$vm_name.vhdx" -New-VM -Name "$vm_name" -generation "$gen" -memorystartupbytes $mem +New-VM -Name "$vm_name" -generation "$gen" -memorystartupbytes $mem -VHDPath "$env:VHD_PATH$vm_name.vhdx" Set-VMHardDiskDrive -VMName "$vm_name" -Path "$env:VHD_PATH$vm_name.vhdx" -ControllerType SCSI Set-VMMemory "$vm_name" -DynamicMemoryEnabled $true -MinimumBytes $min_mem -StartupBytes $mem -MaximumBytes $max_mem Set-VM -Name "$vm_name" -ProcessorCount "$cpus" @@ -137,7 +137,7 @@ Copy-item "${env:SCRIPTS_PATH}Guests\$vm_name.ps1" "${Drive}\Tools\scripts\boot. Dismount-VHD "$env:VHD_PATH$vm_name.vhdx" -New-VM -Name "$vm_name" -generation "$gen" -memorystartupbytes $mem +New-VM -Name "$vm_name" -generation "$gen" -memorystartupbytes $mem -VHDPath "$env:VHD_PATH$vm_name.vhdx" Set-VMHardDiskDrive -VMName "$vm_name" -Path "$env:VHD_PATH$vm_name.vhdx" -ControllerType SCSI Set-VMMemory "$vm_name" -DynamicMemoryEnabled $true -MinimumBytes $min_mem -StartupBytes $mem -MaximumBytes $max_mem Set-VM -Name "$vm_name" -ProcessorCount "$cpus" @@ -172,7 +172,7 @@ Copy-item "${env:SCRIPTS_PATH}Guests\$vm_name.ps1" "${Drive}\Tools\scripts\boot. Dismount-VHD $env:VHD_PATH$vm_name.vhdx -New-VM -Name "$vm_name" -generation "$gen" -memorystartupbytes $mem +New-VM -Name "$vm_name" -generation "$gen" -memorystartupbytes $mem -VHDPath "$env:VHD_PATH$vm_name.vhdx" Set-VMHardDiskDrive -VMName "$vm_name" -Path "$env:VHD_PATH$vm_name.vhdx" -ControllerType SCSI Set-VMMemory "$vm_name" -DynamicMemoryEnabled $true -MinimumBytes $min_mem -StartupBytes $mem -MaximumBytes $max_mem Set-VM -Name "$vm_name" -ProcessorCount "$cpus"