ImageTemplatePowerShellValidator interface

Runs the specified PowerShell script during the validation phase (Windows). Corresponds to Packer powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.

Extends

Properties

inline

Array of PowerShell commands to execute

runAsSystem

If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true when the runElevated field above is set to true.

runElevated

If specified, the PowerShell script will be run with elevated privileges

scriptUri

URI of the PowerShell script to be run for validation. It can be a github link, Azure Storage URI, etc

sha256Checksum

SHA256 checksum of the power shell script provided in the scriptUri field above

type

Polymorphic discriminator, which specifies the different types this object can be

validExitCodes

Valid exit codes for the PowerShell script. [Default: 0]

Inherited Properties

name

Friendly Name to provide context on what this validation step does

Property Details

inline

Array of PowerShell commands to execute

inline?: string[]

Property Value

string[]

runAsSystem

If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true when the runElevated field above is set to true.

runAsSystem?: boolean

Property Value

boolean

runElevated

If specified, the PowerShell script will be run with elevated privileges

runElevated?: boolean

Property Value

boolean

scriptUri

URI of the PowerShell script to be run for validation. It can be a github link, Azure Storage URI, etc

scriptUri?: string

Property Value

string

sha256Checksum

SHA256 checksum of the power shell script provided in the scriptUri field above

sha256Checksum?: string

Property Value

string

type

Polymorphic discriminator, which specifies the different types this object can be

type: "PowerShell"

Property Value

"PowerShell"

validExitCodes

Valid exit codes for the PowerShell script. [Default: 0]

validExitCodes?: number[]

Property Value

number[]

Inherited Property Details

name

Friendly Name to provide context on what this validation step does

name?: string

Property Value

string

Inherited From ImageTemplateInVMValidator.name