revamped automation

This commit is contained in:
rbalsleyMSFT
2023-05-22 16:41:08 -07:00
parent 6883457571
commit d6e5bff58b
33 changed files with 2721 additions and 74 deletions
+19
View File
@@ -0,0 +1,19 @@
#Modify variables
$ISOPath = 'C:\ffu\WinPE_FFU_Capture.iso'
$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 *intel*
get-vm $VMName | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName $VMSwitch.Name
}
}