# PowerShell Plugin Manual 4.0.3

## Preface

This document describes the functionality of the PowerShell plugin. The PowerShell plugin can be used to create XL Deploy extensions and plugins that require PowerShell scripts to be executed on the target platform. For example, the plugins for Windows, Internet Information Services (IIS) and BizTalk have been built on top of this plugin.

### PowerShell step batching

The PowerShell plugin allows one to enable batching of multiple PowerShell steps into a single step. This will improve the throughput of large deployments at the cost of less granular steps.

By default batching is disabled, but it can be enabled to setting the hidden property `powershell.BaseExtensiblePowerShellDeployed.batchSteps` (or the `batchSteps` property on one its subtypes) to `true`.

The maximum number of steps that will be included in one batch can be controlled with the hidden property `powershell.BaseExtensiblePowerShellDeployed.maxBatchSize` (or the `maxBatchSize` property on one of its subtypes).

Next to these configurable options, the following restrictions are applied when batching steps:

1. Only PowerShell steps generated by the type `powershell.BaseExtensiblePowerShellDeployed` or one of its subtypes are batched.
2. Only steps that deploy to the same target container are batched.
3. Only steps with identical orders are batched.
4. Only steps that have identical 'verbs' are batched, e.g. 'Create appPool1 on iis' and 'Deploy website1 on iis' would not be batched, while 'Create appPool1 on iis' and 'Create website1 on iis' would be batched into 'Create appPool1, website1 on iis', provided they had the same order.
5. Steps that have `classpathResources` are never batched.
6. Even though at most `maxBatchSize` steps are batched together, the step description will never be longer than roughly 50 characters plus the name of the container.

# CI Reference

## Configuration Item Overview

### Deployables

### Deployeds

### Containers

### Other Configuration Items

## Configuration Item Details

### powershell.BaseExtensiblePowerShellDeployed

Virtual Type
Type Hierarchy | powershell.BasePowerShellDeployed >> udm.BaseDeployed >> udm.BaseConfigurationItem
Interfaces | udm.EmbeddedDeployedContainer, udm.Deployed, udm.ConfigurationItem

Description unavailable

|  | Parent
--- | --- | ---
|  | container : CI<udm.Container>
|  | The container on which this deployed runs.

|  | Public Properties
--- | --- | ---
|  | deployable : CI<udm.Deployable>
|  | The deployable that this deployed is derived from.
|  | startOnCreate : BOOLEAN = true
|  | If set to true, the start script will be executed if this deployed is being created.
|  | stopOnDestroy : BOOLEAN = true
|  | If set to true, the stop script will be executed if this deployed is being destroyed.
|  | stopStartOnModify : BOOLEAN = true
|  | If set to true, the stop and start scripts will be executed if this deployed is being modified.
|  | stopStartOnNoop : BOOLEAN = true
|  | If set to true, the stop and start scripts will be executed if this deployable is not being modified.

|  | Hidden Properties
--- | --- | ---
|  | createOptions : SET_OF_STRING = [uploadArtifactData, uploadClasspathResources]
|  | Options for the create step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | createOrder : INTEGER = 60
|  | Order at which the create step will be executed.
|  | createVerb : STRING = Create
|  | Verb that is used to prefix the description for the create step.
|  | destroyOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the destroy step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | destroyOrder : INTEGER = 40
|  | Order at which the destroy step will be executed.
|  | destroyVerb : STRING = Destroy
|  | Verb that is used to prefix the description for the destroy step.
|  | discoverOrder : INTEGER = 50
|  | Order at which the discover step will be executed.
|  | maxBatchSize : INTEGER = 100
|  | Maximum number of steps in a batch.
|  | modifyOptions : SET_OF_STRING = [uploadArtifactData, uploadClasspathResources]
|  | Options for the modify step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | modifyOrder : INTEGER = 60
|  | Order at which the modify step will be executed.
|  | modifyVerb : STRING = Modify
|  | Verb that is used to prefix the description for the modify step.
|  | noopOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the noop step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | noopOrder : INTEGER = 50
|  | Order at which the noop step will be executed.
|  | noopVerb : STRING = Noop
|  | Verb that is used to prefix the description for the noop step.
|  | startOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the start step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | startOrder : INTEGER = 90
|  | Order at which the start step will be executed.
|  | startVerb : STRING = Start
|  | Verb that is used to prefix the description for the start step.
|  | stopOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the stop step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | stopOrder : INTEGER = 10
|  | Order at which the stop script will be executed.
|  | stopVerb : STRING = Stop
|  | Verb that is used to prefix the description for the stop step.
|  | batchSteps : BOOLEAN = false
|  | If set to true, multiple steps at the same order will be batched together in one batch to improve performance over high-latency WinRM connections
|  | classpathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the script.
|  | createScript : STRING
|  | PowerShell script invoked to create a resource (or deploy an artifact) on Windows.
|  | destroyScript : STRING
|  | PowerShell script invoked to destroy a resource (or undeploy an artifact) on Windows.
|  | discoverScript : STRING
|  | Script invoked to discover and inspect deployeds of this type.
|  | libraryScripts : LIST_OF_STRING
|  | List of scripts to append to the the step script.
|  | modifyScript : STRING
|  | PowerShell script invoked to modify a resource (or an artifact) on Windows.
|  | noopScript : STRING
|  | PowerShell script invoked to noop a resource or an artifact on Windows.
|  | startScript : STRING
|  | PowerShell script invoked to start a resource of an artifact on Windows.
|  | stopScript : STRING
|  | PowerShell script invoked to stop a resource or an artifact on Windows.

### powershell.BasePowerShellContainer

Virtual Type
Type Hierarchy | udm.BaseContainer >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, powershell.PowerShellContainer, udm.ConfigurationItem, udm.Container, overthere.HostContainer

Description unavailable

|  | Parent
--- | --- | ---
|  | host : CI<overthere.Host>
|  | Host upon which the container resides

|  | Public Properties
--- | --- | ---
|  | tags : SET_OF_STRING
|  | If set, only deployables with the same tag will be automatically mapped to this container.

|  | Hidden Properties
--- | --- | ---
|  | discoverOrder : INTEGER = 0
|  | Order at which the discover step will be executed.
|  | deployedsToDiscover : SET_OF_STRING
|  | Deployeds To Discover
|  | discoverScript : STRING
|  | Script invoked to inspect this container and discover deployeds on it.
|  | libraryScripts : LIST_OF_STRING = [powershell/runtime/base.ps1]
|  | List of scripts to append to the the step script.
|  | powerShellPath : STRING = powershell
|  | Power Shell Path

### powershell.BasePowerShellDeployable

Virtual Type
Type Hierarchy | udm.BaseDeployable >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, udm.Deployable, udm.ConfigurationItem

Description unavailable

|  | Public Properties
--- | --- | ---
|  | tags : SET_OF_STRING
|  | If set, this deployable will only be mapped automatically to containers with the same tag.

### powershell.BasePowerShellDeployableArchiveArtifact

Virtual Type
Type Hierarchy | udm.BaseDeployableArchiveArtifact >> udm.BaseDeployableFileArtifact >> udm.BaseDeployableArtifact >> udm.BaseDeployable >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, udm.Deployable, udm.SourceArtifact, udm.ArchiveArtifact, udm.Artifact, udm.DeployableArtifact, udm.ConfigurationItem, udm.FileArtifact

Description unavailable

|  | Public Properties
--- | --- | ---
|  | checksum : STRING
|  | The checksum used to detect differences on the artifact. If not provided, it will be calculated by XL Deploy.
|  | excludeFileNamesRegex : STRING
|  | Regular expression that matches file names that must be excluded from scanning
|  | placeholders : SET_OF_STRING
|  | Placeholders detected in this artifact
|  | scanPlaceholders : BOOLEAN = false
|  | Whether to scan this artifact for placeholders when it is imported
|  | tags : SET_OF_STRING
|  | If set, this deployable will only be mapped automatically to containers with the same tag.

|  | Hidden Properties
--- | --- | ---
|  | textFileNamesRegex : STRING = .+\.(cfg | conf | config | ini | properties | props | txt | asp | aspx | htm | html | jsf | jsp | xht | xhtml | sql | xml | xsd | xsl | xslt)
|  | Regular expression that matches file names of text files
|  | delimiters : STRING = {{ }}
|  | The delimiters used indicate placeholders, defaults to '{{ }}'. This is a 5 character string with a space in the middle, the first two are the leading delimiter, the last two are the closing delimiter
|  | fileEncodings : MAP_STRING_STRING = {.+\.properties=ISO-8859-1}
|  | A map that maps regular expressions matching the full path of file(s) in the artifact to character set encodings

### powershell.BasePowerShellDeployableFileArtifact

Virtual Type
Type Hierarchy | udm.BaseDeployableFileArtifact >> udm.BaseDeployableArtifact >> udm.BaseDeployable >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, udm.Deployable, udm.SourceArtifact, udm.Artifact, udm.DeployableArtifact, udm.ConfigurationItem, udm.FileArtifact

Description unavailable

|  | Public Properties
--- | --- | ---
|  | checksum : STRING
|  | The checksum used to detect differences on the artifact. If not provided, it will be calculated by XL Deploy.
|  | excludeFileNamesRegex : STRING
|  | Regular expression that matches file names that must be excluded from scanning
|  | placeholders : SET_OF_STRING
|  | Placeholders detected in this artifact
|  | scanPlaceholders : BOOLEAN = true
|  | Whether to scan this artifact for placeholders when it is imported
|  | tags : SET_OF_STRING
|  | If set, this deployable will only be mapped automatically to containers with the same tag.

|  | Hidden Properties
--- | --- | ---
|  | textFileNamesRegex : STRING = .+\.(cfg | conf | config | ini | properties | props | txt | asp | aspx | htm | html | jsf | jsp | xht | xhtml | sql | xml | xsd | xsl | xslt)
|  | Regular expression that matches file names of text files
|  | delimiters : STRING = {{ }}
|  | The delimiters used indicate placeholders, defaults to '{{ }}'. This is a 5 character string with a space in the middle, the first two are the leading delimiter, the last two are the closing delimiter
|  | fileEncodings : MAP_STRING_STRING = {.+\.properties=ISO-8859-1}
|  | A map that maps regular expressions matching the full path of file(s) in the artifact to character set encodings

### powershell.BasePowerShellDeployableFolderArtifact

Virtual Type
Type Hierarchy | udm.BaseDeployableFolderArtifact >> udm.BaseDeployableArtifact >> udm.BaseDeployable >> udm.BaseConfigurationItem
Interfaces | udm.Taggable, udm.Deployable, udm.SourceArtifact, udm.Artifact, udm.DeployableArtifact, udm.ConfigurationItem, udm.FolderArtifact

Description unavailable

|  | Public Properties
--- | --- | ---
|  | checksum : STRING
|  | The checksum used to detect differences on the artifact. If not provided, it will be calculated by XL Deploy.
|  | excludeFileNamesRegex : STRING
|  | Regular expression that matches file names that must be excluded from scanning
|  | placeholders : SET_OF_STRING
|  | Placeholders detected in this artifact
|  | scanPlaceholders : BOOLEAN = true
|  | Whether to scan this artifact for placeholders when it is imported
|  | tags : SET_OF_STRING
|  | If set, this deployable will only be mapped automatically to containers with the same tag.

|  | Hidden Properties
--- | --- | ---
|  | textFileNamesRegex : STRING = .+\.(cfg | conf | config | ini | properties | props | txt | asp | aspx | htm | html | jsf | jsp | xht | xhtml | sql | xml | xsd | xsl | xslt)
|  | Regular expression that matches file names of text files
|  | delimiters : STRING = {{ }}
|  | The delimiters used indicate placeholders, defaults to '{{ }}'. This is a 5 character string with a space in the middle, the first two are the leading delimiter, the last two are the closing delimiter
|  | fileEncodings : MAP_STRING_STRING = {.+\.properties=ISO-8859-1}
|  | A map that maps regular expressions matching the full path of file(s) in the artifact to character set encodings

### powershell.BasePowerShellDeployed

Virtual Type
Type Hierarchy | udm.BaseDeployed >> udm.BaseConfigurationItem
Interfaces | udm.EmbeddedDeployedContainer, udm.Deployed, udm.ConfigurationItem

Description unavailable

|  | Parent
--- | --- | ---
|  | container : CI<udm.Container>
|  | The container on which this deployed runs.

|  | Public Properties
--- | --- | ---
|  | deployable : CI<udm.Deployable>
|  | The deployable that this deployed is derived from.

|  | Hidden Properties
--- | --- | ---
|  | discoverOrder : INTEGER = 50
|  | Order at which the discover step will be executed.
|  | classpathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the script.
|  | discoverScript : STRING
|  | Script invoked to discover and inspect deployeds of this type.
|  | libraryScripts : LIST_OF_STRING
|  | List of scripts to append to the the step script.

### powershell.ExtensiblePowerShellDeployed

Virtual Type
Type Hierarchy | powershell.BaseExtensiblePowerShellDeployed >> powershell.BasePowerShellDeployed >> udm.BaseDeployed >> udm.BaseConfigurationItem
Interfaces | udm.EmbeddedDeployedContainer, udm.Deployed, udm.ConfigurationItem

Base class for all extensible PowerShell deployed resource configuration items.

|  | Parent
--- | --- | ---
|  | container : CI<udm.Container>
|  | The container on which this deployed runs.

|  | Public Properties
--- | --- | ---
|  | deployable : CI<udm.Deployable>
|  | The deployable that this deployed is derived from.
|  | startOnCreate : BOOLEAN = true
|  | If set to true, the start script will be executed if this deployed is being created.
|  | stopOnDestroy : BOOLEAN = true
|  | If set to true, the stop script will be executed if this deployed is being destroyed.
|  | stopStartOnModify : BOOLEAN = true
|  | If set to true, the stop and start scripts will be executed if this deployed is being modified.
|  | stopStartOnNoop : BOOLEAN = true
|  | If set to true, the stop and start scripts will be executed if this deployable is not being modified.

|  | Hidden Properties
--- | --- | ---
|  | createOptions : SET_OF_STRING = [uploadArtifactData, uploadClasspathResources]
|  | Options for the create step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | createOrder : INTEGER = 60
|  | Order at which the create step will be executed.
|  | createVerb : STRING = Create
|  | Verb that is used to prefix the description for the create step.
|  | destroyOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the destroy step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | destroyOrder : INTEGER = 40
|  | Order at which the destroy step will be executed.
|  | destroyVerb : STRING = Destroy
|  | Verb that is used to prefix the description for the destroy step.
|  | discoverOrder : INTEGER = 50
|  | Order at which the discover step will be executed.
|  | maxBatchSize : INTEGER = 100
|  | Maximum number of steps in a batch.
|  | modifyOptions : SET_OF_STRING = [uploadArtifactData, uploadClasspathResources]
|  | Options for the modify step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | modifyOrder : INTEGER = 60
|  | Order at which the modify step will be executed.
|  | modifyVerb : STRING = Modify
|  | Verb that is used to prefix the description for the modify step.
|  | noopOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the noop step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | noopOrder : INTEGER = 50
|  | Order at which the noop step will be executed.
|  | noopVerb : STRING = Noop
|  | Verb that is used to prefix the description for the noop step.
|  | startOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the start step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | startOrder : INTEGER = 90
|  | Order at which the start step will be executed.
|  | startVerb : STRING = Start
|  | Verb that is used to prefix the description for the start step.
|  | stopOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the stop step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | stopOrder : INTEGER = 10
|  | Order at which the stop script will be executed.
|  | stopVerb : STRING = Stop
|  | Verb that is used to prefix the description for the stop step.
|  | batchSteps : BOOLEAN = false
|  | If set to true, multiple steps at the same order will be batched together in one batch to improve performance over high-latency WinRM connections
|  | classpathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the script.
|  | createScript : STRING
|  | PowerShell script invoked to create a resource (or deploy an artifact) on Windows.
|  | destroyScript : STRING
|  | PowerShell script invoked to destroy a resource (or undeploy an artifact) on Windows.
|  | discoverScript : STRING
|  | Script invoked to discover and inspect deployeds of this type.
|  | libraryScripts : LIST_OF_STRING
|  | List of scripts to append to the the step script.
|  | modifyScript : STRING
|  | PowerShell script invoked to modify a resource (or an artifact) on Windows.
|  | noopScript : STRING
|  | PowerShell script invoked to noop a resource or an artifact on Windows.
|  | startScript : STRING
|  | PowerShell script invoked to start a resource of an artifact on Windows.
|  | stopScript : STRING
|  | PowerShell script invoked to stop a resource or an artifact on Windows.

### powershell.ExtensiblePowerShellDeployedArtifact

Virtual Type
Type Hierarchy | powershell.BaseExtensiblePowerShellDeployed >> powershell.BasePowerShellDeployed >> udm.BaseDeployed >> udm.BaseConfigurationItem
Interfaces | udm.EmbeddedDeployedContainer, udm.Artifact, udm.Deployed, udm.ConfigurationItem, udm.DerivedArtifact

Base class for all extensible PowerShell deployed artifact configuration items.

|  | Parent
--- | --- | ---
|  | container : CI<udm.Container>
|  | The container on which this deployed runs.

|  | Public Properties
--- | --- | ---
|  | deployable : CI<udm.Deployable>
|  | The deployable that this deployed is derived from.
|  | placeholders : MAP_STRING_STRING
|  | A Map containing all the placeholders mapped to their values. Special values are or
|  | startOnCreate : BOOLEAN = true
|  | If set to true, the start script will be executed if this deployed is being created.
|  | stopOnDestroy : BOOLEAN = true
|  | If set to true, the stop script will be executed if this deployed is being destroyed.
|  | stopStartOnModify : BOOLEAN = true
|  | If set to true, the stop and start scripts will be executed if this deployed is being modified.
|  | stopStartOnNoop : BOOLEAN = true
|  | If set to true, the stop and start scripts will be executed if this deployable is not being modified.

|  | Hidden Properties
--- | --- | ---
|  | createOptions : SET_OF_STRING = [uploadArtifactData, uploadClasspathResources]
|  | Options for the create step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | createOrder : INTEGER = 60
|  | Order at which the create step will be executed.
|  | createVerb : STRING = Create
|  | Verb that is used to prefix the description for the create step.
|  | destroyOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the destroy step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | destroyOrder : INTEGER = 40
|  | Order at which the destroy step will be executed.
|  | destroyVerb : STRING = Destroy
|  | Verb that is used to prefix the description for the destroy step.
|  | discoverOrder : INTEGER = 50
|  | Order at which the discover step will be executed.
|  | maxBatchSize : INTEGER = 100
|  | Maximum number of steps in a batch.
|  | modifyOptions : SET_OF_STRING = [uploadArtifactData, uploadClasspathResources]
|  | Options for the modify step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | modifyOrder : INTEGER = 60
|  | Order at which the modify step will be executed.
|  | modifyVerb : STRING = Modify
|  | Verb that is used to prefix the description for the modify step.
|  | noopOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the noop step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | noopOrder : INTEGER = 50
|  | Order at which the noop step will be executed.
|  | noopVerb : STRING = Noop
|  | Verb that is used to prefix the description for the noop step.
|  | startOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the start step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | startOrder : INTEGER = 90
|  | Order at which the start step will be executed.
|  | startVerb : STRING = Start
|  | Verb that is used to prefix the description for the start step.
|  | stopOptions : SET_OF_STRING = [uploadClasspathResources]
|  | Options for the stop step (1 or more of: none,uploadArtifactData,uploadClasspathResources,exposeDeployedApplication,exposePreviousDeployed).
|  | stopOrder : INTEGER = 10
|  | Order at which the stop script will be executed.
|  | stopVerb : STRING = Stop
|  | Verb that is used to prefix the description for the stop step.
|  | batchSteps : BOOLEAN = false
|  | If set to true, multiple steps at the same order will be batched together in one batch to improve performance over high-latency WinRM connections
|  | classpathResources : SET_OF_STRING
|  | Additional classpath resources that should be uploaded to the working directory before executing the script.
|  | createScript : STRING
|  | PowerShell script invoked to create a resource (or deploy an artifact) on Windows.
|  | destroyScript : STRING
|  | PowerShell script invoked to destroy a resource (or undeploy an artifact) on Windows.
|  | discoverScript : STRING
|  | Script invoked to discover and inspect deployeds of this type.
|  | libraryScripts : LIST_OF_STRING
|  | List of scripts to append to the the step script.
|  | modifyScript : STRING
|  | PowerShell script invoked to modify a resource (or an artifact) on Windows.
|  | noopScript : STRING
|  | PowerShell script invoked to noop a resource or an artifact on Windows.
|  | startScript : STRING
|  | PowerShell script invoked to start a resource of an artifact on Windows.
|  | stopScript : STRING
|  | PowerShell script invoked to stop a resource or an artifact on Windows.