install windows 10 for virtualbox on ma code example

Example 1: download and install virtualbox with powershell

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;$vBoxURL = "https://download.virtualbox.org/virtualbox";Invoke-WebRequest -Uri "$vBoxURL/LATEST-STABLE.TXT" -OutFile "$env:TEMP\virtualbox-version.txt";$version = ([IO.File]::ReadAllText("$env:TEMP\virtualbox-version.txt")).trim();$vBoxList = Invoke-WebRequest "$vBoxURL/$version";$vBoxVersion =$vBoxList.Links.innerHTML;$vBoxFile = $vBoxVersion | select-string -Pattern "-win.exe";$vBoxFileURL = "$vBoxURL/$version/$vBoxFile";Invoke-WebRequest -Uri $vBoxFileURL -OutFile "$env:TEMP\$vBoxFile";start-process ("$env:TEMP\$vBoxFile") --silent;

Example 2: Virtualbox Set MacOS

VBoxManage.exe modifyvm "Mac" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
VBoxManage setextradata "Mac" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "Mac" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "Mac" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-2BD1B31983FE1663"
VBoxManage setextradata "Mac" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "Mac" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1