A PowerShell 7+ script which creates a new Packer JSON file to build a local VirtualBox Ubuntu machine by merging parameters into the Packer file. This eliminates the need to use the -var-file option.
To install, drop the entire New-PackerVbFile folder into one of your PowerShell 7 (or later) module directories. The default PowerShell module paths are listed in the $Env:PSModulePath environment variable.
Packer and VirtualBox are both installed and in your System PATH.
Refer to the comment-based help in the module script for detailed usage information or see New-PackerVbFile.md
This has only been tested on PowerShell 7 Core on Windows 10 2004. Your mileage may vary if using this with PowerShell 5.1 or PowerShell 6 (Core) and/or other OSes.
New-PackerVbFile is MIT licensed.