EXAMPLE PS C:\> Invoke-TemplateBuild.ps1 -vCenter vcenter.fqdn.com -TemplateFolder TemplateFolder -TemplateName Win2016 -ConfigurationFile Server2016.json Executes packer.exe, connects to a vCenter and moves the template to the correct folder. .
A few months back we looked at how we can use a tool called Packer to automate the creation of virtual machine images, which could then be used with VM Scale Sets. If this is something you are interested in doing, I would recommend taking a look at the original article, which walks you through the whole process. At the end of that article, I said we were next going to look at how we can use ... 出于安全考虑，Windows镜像默认关闭了WinRM。但连接Windows实例及之后在实例内部执行命令都依赖于WinRM，所以需要在实例创建时启用WinRM，而这可以通过UserData来完成。启用WinRM的Userdata文件内容详见winrm_enable_userdata.ps1，Packer则通过配置user_data_file指定UserData文件路径。