mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Updated files
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#Modify variables
|
||||
$ISOPath = 'C:\FFUDevelopment\WinPE_FFU_Capture.iso'
|
||||
$VMSwitchName = '*intel*'
|
||||
|
||||
$vms = get-vm _ffu-* | ? {$_.state -ne 'running'}
|
||||
|
||||
|
||||
If($null -ne $vms){
|
||||
Foreach ($vm in $vms){
|
||||
$VMName = $vm.name
|
||||
$VMDVDDrive = Get-VMDvdDrive -VMName $VMName
|
||||
Set-VMFirmware -VMName $VMName -FirstBootDevice $VMDVDDrive
|
||||
Set-VMDvdDrive -VMName $VMName -Path $ISOPath
|
||||
$VMSwitch = Get-VMSwitch -name $VMSwitchName
|
||||
get-vm $VMName | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName $VMSwitch.Name
|
||||
vmconnect $vm.ComputerName $VMName
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user