UNCLASSIFIED

Skip to content
Snippets Groups Projects
Commit eacadf07 authored by John Rollinson's avatar John Rollinson
Browse files

Update win_domain.yaml

parent 50acd899
Branches
No related merge requests found
heat_template_version: 2016-10-14
description: Heat Template for Windows Module of CCTC - Provides base resources, Windows 7, Windows 10 and UTW test.
parameters:
student_id:
type: string
label: Student ID
description: Student ID Number with No Leading Zeros
last_name:
type: string
label: Last Name
description: Last Name
default:
constraints:
- length: { min: 1, max: 15 }
description: Last name must be no longer than 15 characters
- allowed_pattern: "[a-zA-Z]*"
description: Last name may only contain letters
password:
type: string
label: Password
description: Set root/admin password for instances
hidden: true
default: password
constraints:
- length: { min: 8, max: 20 }
description: Password must be between 8 and 20 characters
- allowed_pattern: "[a-zA-Z0-9]*"
description: Password may not contain special characters
resources:
network_0:
type: OS::Neutron::Net
properties:
name:
str_replace:
template: lastName_network_0
params:
lastName: { get_param: last_name }
admin_state_up: true
shared: false
subnet_0:
type: OS::Neutron::Subnet
properties:
allocation_pools:
- start:
str_replace:
template: 10.studentID.0.200
params:
studentID: { get_param: student_id }
end:
str_replace:
template: 10.studentID.0.250
params:
studentID: { get_param: student_id }
cidr:
str_replace:
template: 10.studentID.0.0/24
params:
studentID: { get_param: student_id }
gateway_ip:
str_replace:
template: 10.studentID.0.254
params:
studentID: { get_param: student_id }
dns_nameservers: [10.50.255.254]
enable_dhcp: true
host_routes: []
ip_version: 4
name:
str_replace:
template: lastname_subnet_0
params:
lastname: { get_param: last_name }
network_id:
get_resource: network_0
external_router:
type: OS::Neutron::Router
properties:
name:
str_replace:
template: lastname_router
params:
lastname: { get_param: last_name }
external_gateway_info:
network: public
external_router_interface_0:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: external_router }
subnet_id: { get_resource: subnet_0 }
server_1_subnet_0_port:
type: OS::Neutron::Port
properties:
network_id: { get_resource: network_0 }
fixed_ips:
- ip_address:
str_replace:
template: 10.studentID.0.1
params:
studentID: { get_param: student_id }
port_security_enabled: false
server_1:
type: OS::Nova::Server
properties:
diskConfig: AUTO
flavor: cy.large
image: Windows Server 2016
name:
str_replace:
template: lastname-Domain-Controller
params:
lastname: { get_param: last_name }
networks:
- port: { get_resource: server_1_subnet_0_port }
user_data:
str_replace:
template: |
#ps1_sysnative
$ErrorActionPreference = 'SilentlyContinue'
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f
Get-Service -Name TermService | Stop-Service -Force
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 4 /f
Get-Service -Name wuauserv | Start-Service
wuauclt.exe /detectnow /updatenow
net user Administrator password123!@
New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\winlogon" -Name "AutoAdminLogon" -PropertyType DWord -Value 1
New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\winlogon" -Name "DefaultUserName" -PropertyType String -Value "Administrator"
New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\winlogon" -Name "DefaultPassword" -PropertyType String -Value 'password123!@'
Invoke-WebRequest -Uri "http://10.50.20.28/scripts/setup1.ps1" -OutFile "C:\setup1.ps1"
Invoke-WebRequest -Uri "http://10.50.20.28/scripts/setup2.ps1" -OutFile "C:\setup2.ps1"
Invoke-WebRequest -Uri "https://bitskrieg.net/mouse.zip" -OutFile "C:\mouse.zip"
Set-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\RunOnce" "setup1" 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -noprofile -sta -File "C:\setup1.ps1"'
exit 1001
params:
$user: { get_param: last_name }
$password: { get_param: password }
$studentID: { get_param: student_id }
user_data_format: RAW
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment