Only way I got pass the Set-VMFirmware error was to change
Set-VMFirmware -BootOrder "Windows 11 VM" -VMName "Windows 11 VM"
to
Set-VMFirmware -VMName "Windows 11 VM"
The VM didn't start so I tried this:
$sVMName = "Windows 11 VM"
$oDVD = Get-VMDvdDrive -VMName $sVMName
$oVM = Get-VM -Name $sVMName
$oHD = $oVM|Get-VMHardDiskDrive
Set-VMFirmware -VMName $sVMName -BootOrder $oDVD
The initial error is now gone and the VM now starts with an option to boot up using the ISO to install windows.
Found this blurb here: https://learn.microsoft.com/en-us/powershell/module/hyper-v/set-vmfirmware?view=windowsserver2019-ps
Sets the boot order for the virtual machine "Test VM". $vmNetworkAdapter contains a VM Network Adapter object (acquired using get-VMNetworkAdapter) and $vmHardDiskDrive contains a VM hard disk object (acquired using get-VMHardDiskDrive). Any existing boot entries not specified by this command will be removed from the virtual machine.
Specifies an array of devices. The boot order determines the order of the devices from which to boot. The acceptable values for this parameter are:
-- VMBootSource
-- VMNetworkAdapter
-- HardDiskDrive
-- DVDDrive
UPDATE
I had to add my WIFI router as a virtual switch.
- Click on Virtual Switch Manager
- Select new Virtual Network Switch
- Select External
- Select your WIFI adapter card in the drop down.
The next item is the most interesting: I had to disable Enhanced Session to see the desktop and log in.
- Click on View
- Uncheck Enhanced Session.
Voila! My first Hyper V VM with internet access.
Now.. the automation of it all from start to finish needs to include the creation/inclusion of the Virtual switch to make it fully automated.