During a bootstrap of a new windows node I would like to install the chef-client (which is done by default) and also install the chef service as part of this install. Here is the bootstrap command I run from the workstation:
knife bootstrap windows winrm win-node2 -p 5985 -x Administrator -P password -N win-node2
I checked the MSI installer docs here: https://docs.chef.io/release/12-5/install_windows.html and under ADDLOCAL you can specify the service option.
Here is the log from the bootstrap:
win-node2 Installing downloaded client package...
win-node2
win-node2 C:\Users\Administrator>msiexec /qn /log "C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-msi22002.log" /i "C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-latest.msi"
win-node2 Successfully installed Chef Client package.
How can I inject "ADDLOCAL="ChefClientFeature,ChefServiceFeature,ChefPSModuleFeature"" into this command upon bootstrap?