By @dylanmei
This works for me. Maybe there's something here for you as well.
in template.json, simplified
...
"provisioners": [{
"type": "file",
"source": "./puppet",
"destination": "C:/Windows/Temp/puppet"
}, {
"type": "file",
"source": "./scripts/site.yaml",
"destination": "C:/Windows/Temp/site.yaml"
}, {
"type": "file",
"source": "./scripts/site.pp",
"destination": "C:/Windows/Temp/site.pp"
}, {
"type": "shell",
"remote_path": "/tmp/script.ps1",
"execute_command": "{{.Vars}} cmd /c powershell C:/Windows/Temp/script.ps1",
"scripts": [
"./scripts/puppet.ps1",
"./scripts/reboot.ps1"]
}]
...
and in puppet.ps1
puppet apply --verbose --modulepath='C:/Windows/Temp/puppet/modules' --hiera_config='C:/Windows/Temp/site.yaml' --detailed-exitcodes C:/Windows/Temp/site.pp