From 66b08e46cc99c591d16eb65d001d5985a012984a Mon Sep 17 00:00:00 2001 From: Winston Smith Date: Tue, 20 Apr 2021 11:39:24 +0200 Subject: [PATCH] Add host files --- Host/Infra-Standard.ps1 | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Host/Infra-Standard.ps1 diff --git a/Host/Infra-Standard.ps1 b/Host/Infra-Standard.ps1 new file mode 100644 index 0000000..9420efe --- /dev/null +++ b/Host/Infra-Standard.ps1 @@ -0,0 +1,67 @@ +## Tool to automate VM creation + +$VMName = "SRV-01" + +$vms = @{ + + Name = $VMName + Generation = '2' + MemoryStartupBytes = 1024Mb + VHDPath = "d:\VHD\$VMName.vhdx" + SwitchName = 'Arc-SRV' + +} + +New-VM @vms +Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB + +$VMName = "RTR-01" + +$vms = @{ + + Name = $VMName + Generation = '2' + MemoryStartupBytes = 1024Mb + VHDPath = "d:\VHD\$VMName.vhdx" + SwitchName = 'Arc-Cli' + + +} + +New-VM @vms +Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB +Add-VMSwitch -Name "Arc-SRV" -ResourcePoolName "Arc-SRV" +Add-VMSwitch -Name "WAN" -ResourcePoolName "WAN" + +$VMName = "RTR-02" + +$vms = @{ + + Name = $VMName + Generation = '2' + MemoryStartupBytes = 1024Mb + VHDPath = "d:\VHD\$VMName.vhdx" + SwitchName = 'Bou-LAN' + +} + +New-VM @vms +Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB +Add-VMSwitch -Name "WAN" -ResourcePoolName "WAN" + +$VMName = "RTR-03" + +$vms = @{ + + Name = $VMName + Generation = '2' + MemoryStartupBytes = 1024Mb + VHDPath = "d:\VHD\$VMName.vhdx" + SwitchName = 'WAN' + +} + +New-VM @vms +Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB +Add-VMSwitch -Name "Aston" -ResourcePoolName "Aston" +