Created
May 20, 2021 18:31
-
-
Save davepidgeon/15489409e1b3258f92aa2b137a1fde33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Set Execution Policy to allow script to run | |
Set-ExecutionPolicy Bypass -Scope Process -Force | |
#Choco install and Choco Apps | |
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install googlechrome -y | |
choco install notepadplusplus -y | |
choco install bginfo -y | |
choco install laps --params='"/ALL"' -y | |
#Download Scripts to Set the rest of the Domain up when logged in | |
New-Item -Path "c:\" -Name "BaselabSetup" -ItemType "directory" -Force | |
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/jakewalsh90/Terraform-Azure/main/Single-Region-Azure-BaseLab/PowerShell/baselab_DomainSetup.ps1" -OutFile "C:\BaselabSetup\baselab_DomainSetup.ps1" | |
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/jakewalsh90/Terraform-Azure/main/Single-Region-Azure-BaseLab/PowerShell/baselab_LabStructure.ps1" -OutFile "C:\BaselabSetup\baselab_LabStructure.ps1" | |
#Setup and Partition Data Disk | |
Get-Disk | Where partitionstyle -eq 'raw' | Initialize-Disk -PartitionStyle MBR -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel 'Data' -Confirm:$false | |
#Allow Ping | |
Set-NetFirewallRule -DisplayName "File and Printer Sharing (Echo Request - ICMPv4-In)" -enabled True | |
Set-NetFirewallRule -DisplayName "File and Printer Sharing (Echo Request - ICMPv6-In)" -enabled True | |
#Install Roles to make Server a Domain Controller | |
Install-windowsfeature -name AD-Domain-Services -IncludeManagementTools | |
Install-windowsfeature -name DNS -IncludeManagementTools |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment