ImageTemplatePowerShellValidator interface    
在验证阶段(Windows)期间运行指定的 PowerShell 脚本。 对应于 Packer powershell 预配程序。 只能指定“scriptUri”或“内联”之一。
属性
| inline | 要执行的 PowerShell 命令数组 | 
| run | 如果指定,将使用本地系统用户提升的权限运行 PowerShell 脚本。 仅当上面的 runElevated 字段设置为 true 时,才能为 true。 | 
| run | 如果指定,将使用提升的权限运行 PowerShell 脚本 | 
| script | 要运行的 PowerShell 脚本的 URI 进行验证。 它可以是 github 链接、Azure 存储 URI 等 | 
| sha256Checksum | 上述 scriptUri 字段中提供的 power shell 脚本的 SHA256 校验和 | 
| type | 多态鉴别器,它指定此对象可以的不同类型的 | 
| valid | PowerShell 脚本的有效退出代码。 [默认值: 0] | 
继承属性
| name | 用于提供此验证步骤的上下文的友好名称 | 
属性详细信息
inline
要执行的 PowerShell 命令数组
inline?: string[]属性值
string[]
		runAsSystem
	 
	如果指定,将使用本地系统用户提升的权限运行 PowerShell 脚本。 仅当上面的 runElevated 字段设置为 true 时,才能为 true。
runAsSystem?: boolean属性值
boolean
		runElevated
	 
	如果指定,将使用提升的权限运行 PowerShell 脚本
runElevated?: boolean属性值
boolean
		scriptUri
	 
	要运行的 PowerShell 脚本的 URI 进行验证。 它可以是 github 链接、Azure 存储 URI 等
scriptUri?: string属性值
string
sha256Checksum
上述 scriptUri 字段中提供的 power shell 脚本的 SHA256 校验和
sha256Checksum?: string属性值
string
type
多态鉴别器,它指定此对象可以的不同类型的
type: "PowerShell"属性值
"PowerShell"
		validExitCodes
	  
	PowerShell 脚本的有效退出代码。 [默认值: 0]
validExitCodes?: number[]属性值
number[]