🎯 Objective:

Automate the deployment of the entire infrastructure manually created in Stage 1, using modular PowerShell scripts. All scripts are designed to run on Windows Server Core and are prepared for containerization and deployment within Kubernetes.


πŸ“ Project Structure

/project-root
β”‚
β”œβ”€β”€ automation/
β”‚   β”œβ”€β”€ 00-config.ps1                       # Global variables and settings
β”‚   β”œβ”€β”€ 01-post-network.ps1                 # IP, DNS, WinRM configuration
β”‚   β”œβ”€β”€ 02-install-roles.ps1                # Installing required roles
β”‚   β”œβ”€β”€ 03-domain-setup-primary.ps1         # Domain creation on SRV-CORE1
β”‚   β”œβ”€β”€ 03-domain-setup-secondary.ps1       # Join second server to domain
β”‚   β”œβ”€β”€ 03b-promote-secondary.ps1           # Promote secondary server to DC
β”‚   β”œβ”€β”€ 04-ad-users-groups.ps1              # Users and groups
β”‚   β”œβ”€β”€ 05-dns-dhcp-primary.ps1             # DNS & DHCP setup (primary)
β”‚   β”œβ”€β”€ 05-dns-dhcp-secondary.ps1           # DNS & DHCP setup (secondary)
β”‚   β”œβ”€β”€ 06-gpo-setup.ps1                    # GPO and OU configuration
β”‚   β”œβ”€β”€ 07-dfs-setup.ps1                    # DFS and quota setup
β”‚   β”œβ”€β”€ 08-iis-setup.ps1                    # Deploy test website
β”‚   β”œβ”€β”€ 09-failover-setup.ps1               # DHCP Failover 50/50
β”‚   β”œβ”€β”€ 10-replication-robocopy-primary.ps1 # Robocopy replication (primary)
β”‚   β”œβ”€β”€ 10-replication-robocopy-secondary.ps1 # Share target folder (secondary)
β”‚
β”‚   β”œβ”€β”€ common/
β”‚   β”‚   └── Set-FsrmQuota.ps1               # Quotas via COM API (FSRM)
β”‚
β”‚   β”œβ”€β”€ tests/
β”‚   β”‚   └── Test-Infrastructure.ps1         # CLI test script for infrastructure
β”‚
└── README.md                               # Main project documentation


βœ… Implemented Features

image.png


🧠 Notes