From 69302e71129f387f0708099d112e5ab6109e6d3b Mon Sep 17 00:00:00 2001 From: Alex 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" +