Feat: Add VNetwork creation
This commit is contained in:
parent
e219cd7af8
commit
a2d215121a
@ -4,3 +4,10 @@ New-Item -Path "d:\VHD" -Name "Base" -ItemType "directory"
|
|||||||
Move-Item d:/sources d:/VHD/
|
Move-Item d:/sources d:/VHD/
|
||||||
New-VHD -ParentPath d:\VHD\source\Base_2016_14393.161220_StdGUI_G2_upd28022017.vhdx -Path d:\VHD\Base\Base_SRV_diff.vhdx -Differencing
|
New-VHD -ParentPath d:\VHD\source\Base_2016_14393.161220_StdGUI_G2_upd28022017.vhdx -Path d:\VHD\Base\Base_SRV_diff.vhdx -Differencing
|
||||||
New-VHD -ParentPath d:\VHD\source\Master_Win10_20h2_x86_G1.vhdx -Path d:\VHD\Base\Base_CLI_diff.vhdx -Differencing
|
New-VHD -ParentPath d:\VHD\source\Master_Win10_20h2_x86_G1.vhdx -Path d:\VHD\Base\Base_CLI_diff.vhdx -Differencing
|
||||||
|
|
||||||
|
### Create VMNetworks
|
||||||
|
New-VMSwitch -name Arc-CLI -SwitchType Private
|
||||||
|
New-VMSwitch -name Arc-SRV -SwitchType Private
|
||||||
|
New-VMSwitch -name Bou-LAN -SwitchType Private
|
||||||
|
New-VMSwitch -name WAN -SwitchType Private
|
||||||
|
New-VMSwitch -name Aston -NetAdapterName Ethernet -AllowManagementOS $true
|
||||||
|
@ -13,6 +13,7 @@ cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\SRV-01.vhdx
|
|||||||
$Lettre = Mount-VHD -Path "d:\VHD\SRV-01.VHDx" -PassThru | Get-Disk | Get-Partition | Get-Volume | Sort-Object -Property Size -Descending | Select-Object -First 1
|
$Lettre = Mount-VHD -Path "d:\VHD\SRV-01.VHDx" -PassThru | Get-Disk | Get-Partition | Get-Volume | Sort-Object -Property Size -Descending | Select-Object -First 1
|
||||||
$DriveLetter = $Lettre.DriveLetter
|
$DriveLetter = $Lettre.DriveLetter
|
||||||
$drive = $DriveLetter + ":"
|
$drive = $DriveLetter + ":"
|
||||||
|
New-Item -Path "${Driveletter}:\conf\" -Name "Base" -ItemType "directory"
|
||||||
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination "$Drive\Windows\Panther\Unattend.xml"
|
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination "$Drive\Windows\Panther\Unattend.xml"
|
||||||
Copy-Item D:\Scripts\deploy.cmd -Destination "${Driveletter}:\conf\deploy.cmd"
|
Copy-Item D:\Scripts\deploy.cmd -Destination "${Driveletter}:\conf\deploy.cmd"
|
||||||
mkdir "${Driveletter}:\Tools\Scripts"
|
mkdir "${Driveletter}:\Tools\Scripts"
|
||||||
@ -45,6 +46,7 @@ cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\SRV-03.vhdx
|
|||||||
$Lettre = Mount-VHD -Path "d:\VHD\SRV-03.VHDx" -PassThru | Get-Disk | Get-Partition | Get-Volume | Sort-Object -Property Size -Descending | Select-Object -First 1
|
$Lettre = Mount-VHD -Path "d:\VHD\SRV-03.VHDx" -PassThru | Get-Disk | Get-Partition | Get-Volume | Sort-Object -Property Size -Descending | Select-Object -First 1
|
||||||
$DriveLetter = $Lettre.DriveLetter
|
$DriveLetter = $Lettre.DriveLetter
|
||||||
$drive = $DriveLetter + ":"
|
$drive = $DriveLetter + ":"
|
||||||
|
New-Item -Path "${Driveletter}:\conf\" -Name "Base" -ItemType "directory"
|
||||||
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination "$Drive\Windows\Panther\Unattend.xml"
|
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination "$Drive\Windows\Panther\Unattend.xml"
|
||||||
Copy-Item D:\Scripts\deploy.cmd -Destination "${Driveletter}:\conf\deploy.cmd"
|
Copy-Item D:\Scripts\deploy.cmd -Destination "${Driveletter}:\conf\deploy.cmd"
|
||||||
mkdir "${Driveletter}:\Tools\Scripts"
|
mkdir "${Driveletter}:\Tools\Scripts"
|
||||||
@ -79,6 +81,7 @@ cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\RTR-01.vhdx
|
|||||||
$Lettre = Mount-VHD -Path "d:\VHD\RTR-01.VHDx" -PassThru | Get-Disk | Get-Partition | Get-Volume | Sort-Object -Property Size -Descending | Select-Object -First 1
|
$Lettre = Mount-VHD -Path "d:\VHD\RTR-01.VHDx" -PassThru | Get-Disk | Get-Partition | Get-Volume | Sort-Object -Property Size -Descending | Select-Object -First 1
|
||||||
$DriveLetter = $Lettre.DriveLetter
|
$DriveLetter = $Lettre.DriveLetter
|
||||||
$drive = $DriveLetter + ":"
|
$drive = $DriveLetter + ":"
|
||||||
|
New-Item -Path "${Driveletter}:\conf\" -Name "Base" -ItemType "directory"
|
||||||
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination "$Drive\Windows\Panther\Unattend.xml"
|
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination "$Drive\Windows\Panther\Unattend.xml"
|
||||||
Copy-Item D:\Scripts\deploy.cmd -Destination "${Driveletter}:\conf\deploy.cmd"
|
Copy-Item D:\Scripts\deploy.cmd -Destination "${Driveletter}:\conf\deploy.cmd"
|
||||||
mkdir "${Driveletter}:\Tools\Scripts"
|
mkdir "${Driveletter}:\Tools\Scripts"
|
||||||
@ -115,6 +118,7 @@ cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\RTR-02.vhdx
|
|||||||
$Lettre = Mount-VHD -Path "d:\VHD\RTR-02.VHDx" -PassThru | Get-Disk | Get-Partition | Get-Volume | Sort-Object -Property Size -Descending | Select-Object -First 1
|
$Lettre = Mount-VHD -Path "d:\VHD\RTR-02.VHDx" -PassThru | Get-Disk | Get-Partition | Get-Volume | Sort-Object -Property Size -Descending | Select-Object -First 1
|
||||||
$DriveLetter = $Lettre.DriveLetter
|
$DriveLetter = $Lettre.DriveLetter
|
||||||
$drive = $DriveLetter + ":"
|
$drive = $DriveLetter + ":"
|
||||||
|
New-Item -Path "${Driveletter}:\conf\" -Name "Base" -ItemType "directory"
|
||||||
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination "$Drive\Windows\Panther\Unattend.xml"
|
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination "$Drive\Windows\Panther\Unattend.xml"
|
||||||
Copy-Item D:\Scripts\deploy.cmd -Destination "${Driveletter}:\conf\deploy.cmd"
|
Copy-Item D:\Scripts\deploy.cmd -Destination "${Driveletter}:\conf\deploy.cmd"
|
||||||
mkdir "${Driveletter}:\Tools\Scripts"
|
mkdir "${Driveletter}:\Tools\Scripts"
|
||||||
@ -151,6 +155,7 @@ cp D:\VHD\Base\Base_SRV_diff.vhdx D:\VHD\RTR-03.vhdx
|
|||||||
$Lettre = Mount-VHD -Path "d:\VHD\RTR-03.VHDx" -PassThru | Get-Disk | Get-Partition | Get-Volume | Sort-Object -Property Size -Descending | Select-Object -First 1
|
$Lettre = Mount-VHD -Path "d:\VHD\RTR-03.VHDx" -PassThru | Get-Disk | Get-Partition | Get-Volume | Sort-Object -Property Size -Descending | Select-Object -First 1
|
||||||
$DriveLetter = $Lettre.DriveLetter
|
$DriveLetter = $Lettre.DriveLetter
|
||||||
$drive = $DriveLetter + ":"
|
$drive = $DriveLetter + ":"
|
||||||
|
New-Item -Path "${Driveletter}:\conf\" -Name "Base" -ItemType "directory"
|
||||||
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination "$Drive\Windows\Panther\Unattend.xml"
|
Copy-Item D:\Scripts\Unattend\FullUnattend-srv.xml -Destination "$Drive\Windows\Panther\Unattend.xml"
|
||||||
Copy-Item D:\Scripts\deploy.cmd -Destination "${Driveletter}:\conf\deploy.cmd"
|
Copy-Item D:\Scripts\deploy.cmd -Destination "${Driveletter}:\conf\deploy.cmd"
|
||||||
mkdir "${Driveletter}:\Tools\Scripts"
|
mkdir "${Driveletter}:\Tools\Scripts"
|
||||||
|
Loading…
Reference in New Issue
Block a user