ImageTemplatePowerShellCustomizer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Runs the specified PowerShell on the VM (Windows). Corresponds to Packer powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.
[System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Models.ImageTemplatePowerShellCustomizerTypeConverter))]
public class ImageTemplatePowerShellCustomizer : Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Models.IImageTemplatePowerShellCustomizer, Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Runtime.IValidates
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Models.ImageTemplatePowerShellCustomizerTypeConverter))>]
type ImageTemplatePowerShellCustomizer = class
interface IImageTemplatePowerShellCustomizer
interface IJsonSerializable
interface IImageTemplateCustomizer
interface IValidates
Public Class ImageTemplatePowerShellCustomizer
Implements IImageTemplatePowerShellCustomizer, IValidates
- Inheritance
-
ImageTemplatePowerShellCustomizer
- Attributes
- Implements
Constructors
| Name | Description |
|---|---|
| ImageTemplatePowerShellCustomizer() |
Creates an new ImageTemplatePowerShellCustomizer instance. |
Properties
| Name | Description |
|---|---|
| Inline |
Array of PowerShell commands to execute |
| Name |
Friendly Name to provide context on what this customization step does |
| 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 customizing. It can be a github link, SAS URI for Azure Storage, etc |
| Sha256Checksum |
SHA256 checksum of the power shell script provided in the scriptUri field above |
| Type |
The type of customization tool you want to use on the Image. For example, "Shell" can be shell customizer |
| ValidExitCode |
Valid exit codes for the PowerShell script. [Default: 0] |
Methods
| Name | Description |
|---|---|
| DeserializeFromDictionary(IDictionary) |
Deserializes a IDictionary into an instance of ImageTemplatePowerShellCustomizer. |
| DeserializeFromPSObject(PSObject) |
Deserializes a PSObject into an instance of ImageTemplatePowerShellCustomizer. |
| FromJson(JsonNode) |
Deserializes a JsonNode into an instance of Microsoft.Azure.PowerShell.Cmdlets.ImageBuilder.Models.IImageTemplatePowerShellCustomizer. |
| FromJsonString(String) |
Creates a new instance of ImageTemplatePowerShellCustomizer, deserializing the content from a json string. |
| ToJson(JsonObject, SerializationMode) |
Serializes this instance of ImageTemplatePowerShellCustomizer into a JsonNode. |
| ToJsonString() |
Serializes this instance to a json string. |
| ToString() | |
| Validate(IEventListener) |
Validates that this object meets the validation criteria. |