IIS

24 minute readExtensibilityDeveloper productivity

This plugin allows users to interact with the Internet Information Services Server 7 (IIS7) and higher versions and accomplish tasks such as managing web site and virtual directories using the specific tools of IIS7 through command line. Using this plugin, users can configure IIS from scripts or executables, run tasks as create a virtual directory and create a website. Also, users can check the status of running processes to see if they ran successfully or if an error existed and determine what caused the error.

This plugin uses appcmd.exe to interact with IIS, so the procedures run on the resource with IIS server.

Some procedures use the WebDeploy utility (Deploy and AdvancedDeploy). WebDeploy must be installed separately; it is not included in the default IIS setup. It can be downloaded from the Microsoft site https://www.iis.net/downloads/microsoft/web-deploy. After installation, WebDeploy can usually be found in C:/Program Files/IIS/Microsoft WebDeploy V3 directory.

Plugin Version 3.1.7.2020092501 Revised on May 19, 2020

Integrated version

This plugin supports next versions of IIS:

  • 7.0

  • 7.5

  • 8.0

  • 8.5

  • 10

This plugin supports next versions of Web Deploy:

  • 3.5

  • 3.6

Plugin configuration

Plugin configurations are sets of parameters that apply across some or all of the plugin’s procedures. They are intended to reduce repetition of common values, create predefined sets of parameters for end users, and to securely store credentials where needed. Each configuration is given a unique name that is entered in designated parameters on procedures that use them.

Plugin configurations are created by going to the CloudBees CD "Administration" tab, then to the "Plugins" sub-tab. On the right side of the line for the specific plugin, there is a "Configure" link which will open the Configuration page.

Please note, that configuration is used only for CheckServerStatus procedure (for now).

To enable CloudBees CD to communicate with your IIS server, create an IIS configuration, supplying the following information:

ParameterDescription

Configuration Name

Provide a unique name for the configuration, keeping in mind that you may need to create additional configurations over time.

IIS IP Address

Provide the URL for the IIS server, it must include the protocol. i.e: 'http://192.168.1.100'.

IIS Port

Provide the port for the IIS server. This port is used in conjuction with the IP Adress to conform the URL. If not provided, CloudBees CD uses the default port '80'. i.e: '8081'.

Computer Name (DEPRECATED)

Provide the computer name or IP address without backslashes. i.e: 'server01'. Is not used, will be removed in the next release.

Login as

Username: Provide the user name CloudBees CD uses to communicate with the IIS server.

Password: Provide the password for the specified Username.

Retype Password: Retype the password specified.

Enter this parameters in the configuration panel:

Plugin procedures

In the CloudBees CD UI, from the Home page, open the Main Menu, and click Admin > Plugins to open the Plugin Manager.
For all parameter descriptions below, required parameters are shown in bold italics.

CheckServerStatus

Checks the status of the specified server.

ParameterDescription

Configuration name

Provide the name of the configuration that holds connection information for the IIS server. In this case, only credentials are taken from the configuration if the Use Credentials parameter is checked.

Use Credentials (Deprecated)

Indicate if credentials must be used. If checked, CloudBees CD uses the user and password typed in the configuration. This parameter is deprecated, credentials will be used if they are provided.

Credential

Specify username and password for check. Will be used for basic authentication.

Link to Check For

Url to check. If not given, one will be constructed from IIS conf.

Expected Status

3-digit HTTP status to wait for. Default is 200. Can be regular expression, e.g. 200

201.

Check Unavailable

If checked, the server:port will just be checked for availability and URL path and status parameters will be ignored. If server is available, the procedure will fail.

Timeout

Specify connection timeout. Default is 30s.

Retries

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the result of the check:

The logs similar to the following must appear:

Using plugin EC-IIS-3.1.0.0
Logs are redirected to property /myJob/debug_logs
Got parameter "checkRetries" with value ""
Got parameter "checkTimeout" with value ""
Got parameter "checkUrl" with value "http://localhost:80"
Got parameter "configname" with value ""
Got parameter "credential" with value ""
Got parameter "expectStatus" with value "200"
Got parameter "unavailable" with value "0"
Using timeout: 30 seconds
Request: GET http://localhost:80


Retries left: 0
URL successful (expected 200):

CreateAppPool

Creates an IIS application pool or updates the existed one.

ParameterDescription

Application pool name

The name of the Application Pool to create. i.e: 'FirstAppPool'.

.NET framework version

Configures the application pool to load a specific version of the .NET Framework. Selecting No Managed Code causes all ASP.NET requests to fail.

Enable 32-bit applications

If set to True for an application pool on a 64-bit operating system, the worker process(es) serving the application pool run in WOW64 (Windows on Windows64) mode. In WOW64 mode, 32-bit processes load only 32-bit applications.

Managed pipeline mode

Configures ASP.NET to run in classic mode as an ISAPI extension or in integrated mode where managed code is integrated into the request-processing pipeline.

Queue length

Maximum number of requests that Http.sys queues for the application pool. When the queue is full, new requests receive a 503 "Service Unavailable" response.

Start automatically

If True, the application pool starts on creation or when IIS starts. Starting an application pool sets this property to True. Stopping an application sets this property to False.

Limit

Configures the maximum percentage of CPU time (in 1/1000ths of a percent) that the worker processes in an application pool are allowed to consume over a period of time as indicated by the Limit Interval setting (resetInterval property). If the limit set by Limit (limit property) is exceeded, the event is written to the event log and an optional set of events can be triggered or determined by the Limit Action setting (action property). Setting the value of Limit to 0 disables limiting the worker processes to a percentage of CPU time.

Limit action

If set to NoAction, an event log entry is generated. If set to KillW3WP, the application pool is shut down for the duration of the reset interval and an event log entry is generated.

Limit interval (minutes)

Specifies the reset period (in minutes) for CPU monitoring and throttling limits on the application pool. When the number of minutes elapsed since the last process accounting reset equals the number specified by this property, IIS resets the CPU timers for both the logging and limit intervals. Setting the value of Limit Interval to 0 disables CPU monitoring.

Processor affinity enabled

If True, Processor Affinity Enabled forces the worker process(es) serving this application pool to run on specific CPUs. This enables sufficient use of CPU caches on multiprocessor servers.

Processor affinity mask

Hexadecimal mask that forces the worker process(es) for this application pool to run on a specific CPU. If processor affinity is enabled, a value of 0 causes an error condition.

Identity

Configures the application pool to run as a built-in account, such as Network Service (recommended), Local Service, or as a specific user identity.

Idle timeout (minutes)

Amount of time (in minutes) a worker process remains idle before it shuts down. A worker process is idle if it is not processing requests and no new requests are received.

Load user profile

Specifies whether IIS loads the user profile for an application pool identity. When set to True, IIS loads the user profile for the application pool identity. Set to False when you require IIS 6.0 behavior.

Maximum worker processes

Maximum number of worker processes permitted to service requests for the application pool. If this number is greater than 1, the application pool is called a Web garden.

Ping enabled

If True, the worker process(es) serving this application pool are pinged periodically to ensure that they are still responsive. This process is called health monitoring.

Ping maximum response time (seconds)

Maximum time (in seconds) that a worker process is given to respond to a health monitoring ping. If the worker process does not respond, it is terminated.

Ping period (seconds)

Period of time (in seconds) between health monitoring pings sent to the worker process(es) serving this application pool.

Shutdown time limit (seconds)

Period of time (in seconds) a worker process is given to finish processing requests and shut down. If the worker process exceeds the shutdown time limit, it is terminated.

Startup time limit (seconds)

Period of time (in seconds) a worker process is given to start up and initialize. If the worker process initialization exceeds the startup time limit, it is terminated.

Application pool process orphaning enabled

If True, an unresponsive worker process is abandoned (orphaned) instead of terminated. This feature can be used to debug a worker process failure.

Orphan action executable

Executable to run when a worker process is abandoned (orphaned). For example, "C:\dbgtools\ntsd.exe" would invoke NTSD to debug a worker process failure.

Orphan action executable parameters

Parameters for the executable that is run when a worker process is abandoned (orphaned). For example, -g -p %1% is appropriate if the NTSD is the executable invoked for debugging worker process failures.

Service unavailable response type

If set to HttpLevel and the application pool is stopped, Http.sys returns an HTTP 503 error. If set to TcpLevel, Http.sys resets the connection. This is useful if the load balancer recognizes one of the response types and subsequently redirects it.

Rapid fail protection enabled

If True, the application pool is shut down if there are a specified number of worker process failures (Maximum Failures) within a specified period (Failure Interval). By default, an application pool is shut down if there are five failures in a five minute period.

Failure interval (minutes)

The time interval (in minutes) during which the specified number of worker process failures (Maximum Failures) must occur before the application pool is shut down by Rapid Fail Protection.

Maximum failures

Maximum number of worker process failures permitted before the application pool is shut down by Rapid Fail Protection.

Shutdown executable

Executable to run when an application pool is shut down by Rapid Fail Protection. This can be used to configure a load balancer to redirect traffic for this application to another server.

Shutdown executable parameters

Parameters for the executable to run when an application pool is shut down by Rapid Fail Protection.

Disable overlapped recycle

If True, when the application pool recycles, the existing worker process exits before another worker process is created. Set to True if the worker process loads an application that does not support multiple instances.

Disable recycling for configuration changes

If True, the application pool does not recycle when its configuration is changed.

Private memory limit (KB)

Maximum amount of private memory (in KB) a worker process can consume before causing the application pool to recycle. A value of 0 means there is no limit.

Regular time interval (minutes)

Period of time (in minutes) after which an application pool recycles. A value of 0 means the application pool does not recycle at a regular interval.

Request limit

Maximum number of requests an application pool can process before it is recycled. A value of 0 means the application pool can process an unlimited number of requests.

Specific times

A set of specific local times, in 24 hour format, when the application pool is recycled.

Virtual memory limit (KB)

Maximum amount of virtual memory (in KB) a worker process can consume before causing the application pool to recycle. A value of 0 means there is no limit.

Additional parameters

Additional parameters to pass to appcmd.exe.

To create an application pool, select the following highlighted step:

Then, enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the application pool was created successfully:

In the CreateAppPool step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

CreateVirtualDirectory

Creates a new virtual directory in the specified website or updates the existed one.

ParameterDescription

Application name

The website and virtual path to contain the Virtual Directory to create, i.e: 'Default Web Site/myapp02'.

Virtual path

Virtual path of the virtual directory, i.e: '/myvirtualdir'.

Absolute physical path

The absolute physical path of the Virtual Directory to create, i.e: 'c:/Inetpub/wwwroot/myvdir'.

Create Directory?

If checked, the specified directory will be created if it does not exist.

Credential

If provided, this credential will be used to access site folder. Can be used for network paths. Please notice, that passwords are stored in clear text in the IIS configuration. If this field is not set, Application User (Pass-through authentication) will be used. Double-quote '"' is not supported in username/password due to escape issues.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the virtual directory was created successfully:

Logs will be similar to the following:

Using plugin EC-IIS-3.1.0.0
Got parameter "appname" with value "Default Web Site/"
Got parameter "createDirectory" with value "1"
Got parameter "credential" with value "credential"
Got parameter "path" with value "mydir"
Got parameter "physicalpath" with value "c:/tmp/path"
Going to create directory "C:\tmp\path"
Directory "C:\tmp\path" already exists, skipping
Virtual directory Default Web Site/mydir does not exists, proceeding to creating it
Wrote command to property cmdLine
Going to run command: "C:\WINDOWS\system32\inetsrv\appcmd" add vdir /app.name:"Default Web Site/" /path:"/mydir" /physicalPath:"C:\tmp\path"
Exit code: 0
STDOUT: VDIR object "Default Web Site/mydir" added
STDERR: N/A
Going to set credentails for directory "Default Web Site/mydir"
Going to run command: "C:\WINDOWS\system32\inetsrv\appcmd" set vdir /vdir.name:"Default Web Site/mydir" /username:"build" /password:"*****"
Exit code: 0
STDOUT: VDIR object "Default Web Site/mydir" changed
STDERR: N/A

CreateWebApplication

Creates or updates and starts an in-process web application in the given directory. This procedure assumes that the specified application path exists as a virtual directory.

ParameterDescription

Website Name

The name of the website to add the application, i.e: 'Default Web Site'.

Virtual Path

Virtual path of the application, i.e: '/myApplication'.

Absolute Physical Path

The absolute physical path of the application to create, i.e: 'c:/Inetpub/wwwroot/myApp'.

Create Directory?

If checked, the specified directory will be created if it does not exist.

Credential

If provided, this credential will be used to access site folder. Can be used for network paths. Please notice, that passwords are stored in clear text in the IIS configuration. If this field is not set, Application User (Pass-through authentication) will be used. Double-quote '"' is not supported in username/password due to escape issues.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the web application was created successfully:

Logs will look like the following:

Using plugin EC-IIS-3.1.0.0
Got parameter "appname" with value "Default Web Site"
Got parameter "createDirectory" with value "1"
Got parameter "credential" with value "credential"
Got parameter "path" with value "myApp"
Got parameter "physicalpath" with value "c:/tmp/myApp"
Application full name: Default Web Site/myApp
Going to create directory "C:\tmp\myApp"
Created directory "C:\tmp\myApp"
Wrote command to property cmdLine
Going to run command: "C:\WINDOWS\system32\inetsrv\appcmd" add app /site.name:"Default Web Site" /path:"/myApp" /physicalPath:"C:\tmp\myApp"
Exit code: 0
STDOUT: APP object "Default Web Site/myApp" added
VDIR object "Default Web Site/myApp" added
STDERR: N/A
Going to set credentails for directory Default Web Site/myApp/
Going to run command: "C:\WINDOWS\system32\inetsrv\appcmd" set vdir /vdir.name:"Default Web Site/myApp/" /username:"build" /password:"*****"
Exit code: 0
STDOUT: VDIR object "Default Web Site/myApp/" changed
STDERR: N/A

CreateWebSite

Creates or updates a website configuration on a local or remote computer.

ParameterDescription

Website name

The name of the Website to create.

Website path

If specified, will cause the root application containing a root virtual directory pointing to the specified path to be created for this site. If omitted, the site is created without a root application and will not be startable until one is created.

Website ID

The id of the Website.

List of bindings

List of bindings in the friendly form of 'http://domain:port,…​' or raw form of 'protocol/bindingInformation,…​'. Bindings should be separated by comma.

Create Directory?

If checked, the specified directory will be created if it does not exist.

Credential

If provided, this credential will be used to access site folder. Can be used for network paths. Please notice, that passwords are stored in clear text in the IIS configuration. If this field is not set, Application User (Pass-through authentication) will be used. Double-quote '"' is not supported in username/password due to escape issues.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the website was created successfully:

Logs should look like the following:

Using plugin EC-IIS-3.1.0.0
Got parameter "bindings" with value "http://*:8080"
Got parameter "createDirectory" with value "1"
Got parameter "credential" with value ""
Got parameter "websiteid" with value ""
Got parameter "websitename" with value "My Site"
Got parameter "websitepath" with value "c:/tmp/my site"
Going to create directory "C:\tmp\my site"
Created directory "C:\tmp\my site"
Site My Site does not exist
Wrote command to property cmdLine
Going to run command: "C:\WINDOWS\system32\inetsrv\appcmd" add site /site.name:"My Site" /bindings:"http://*:8080" /physicalPath:"C:\tmp\my site"
Exit code: 0
STDOUT: SITE object "My Site" added
APP object "My Site/" added
VDIR object "My Site/" added
STDERR: N/A

DeleteWebApplication

Deletes a web application from the specified Website.

ParameterDescription

Application Name

The Website that contains the Application to delete. i.e: 'Default Web Site/' or 'Site1/myapp'.

Strict Mode

If checked, the procedure will fail in case the specified application does not exist.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the web application was deleted successfully:

In the DeleteWebApplication step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

DeleteVirtualDirectory

Deletes a virtual directory from the specified website.

ParameterDescription

Virtual directory name

The Website and virtual path that contains the Virtual Directory to delete. i.e: 'Default Web Site/' or 'Site1/myapp'.

Strict mode

If checked, the procedure will fail in case the specified virtual directory does not exist.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the virtual directory was deleted successfully:

In the DeleteVirtualDirectory step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

DeleteWebSite

Deletes a website.

ParameterDescription

Website name

The name of the website to delete. i.e: 'Default Web Site/' or 'Site1/myapp'.

Strict mode

If checked, the procedure will fail in case the specified website does not exist.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the website was deleted successfully:

In the DeleteWebSite step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

DeleteAppPool

Deletes an application pool.

ParameterDescription

Application pool name

The name of the website to delete. i.e: 'Default Web Site/' or 'Site1/myapp'.

Strict mode

If checked, the procedure will fail in case the specified application pool does not exist.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the application pool was deleted successfully:

In the DeleteAppPool step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

DeployCopy

Copies the application files recursively to the website application’s physical directory.

ParameterDescription

Destination path

Provide the path to the destination directory. This must be a physical directory, but it may have an IIS virtual directory pointing to it. i.e: 'C:\inetpub\wwwroot\copyTest'. (Required)

Path to XCOPY

Provide the relative or absolute path to the XCOPY (or similar) executable. (Required)

Source path

Provide the path to the source directory. i.e: 'C:\inetpub\wwwroot\test'.(Required)

Additional options

Indicate option switches for the XCOPY executable, excluding source and destination directories. The default options are those recommended by Microsoft for ASP.NET and IIS website deployment; exercise caution when changing these options.

  • /E - Deep copy including empty dirs

  • /K - Copy attributes

  • /R - Overwrite read-only files

  • /H - Copy hidden and system files

  • /I - If the destination does not exist and you are copying more than one file, it is assumed that the destination is a directory.

  • /Y - Suppress prompting for overwrite confirmation

To deploy copy, select the following highlighted step:

Then, enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the copy was success:

In the DeployCopy step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

Deploy

Uses MsDeploy (WebDeploy) to deploy a package or a site from directory into the specified destination. Also allows to configure application pool.

MsDeploy is required for this procedure.

ParameterDescription

MS deploy path

Provide the relative or absolute path to the MSDeploy executable.

Deploy source path

A path to package (application.zip) or to directory which contains the content to be deployed.

Destination website

A name of the web site to be deployed.

Destination application

A name of the application to be deployed. If not provided, the content will be placed under the website.

Application pool name

Application pool name. If the application pool does not exists, it will be created. If this parameter was not specified, the application will be placed into the default pool, which has the same name as website.

.NET framework version

.NET Framework version 3.5 includes all the functionality of earlier versions, and introduces new features for the technologies in versions 2.0 and 3.0 and additional technologies in the form of new assemblies. To use version 3.5, install the appropriate version of .NET Framework and use product-specific guidelines.

Enable 32-bit applications

If set to True for an application pool on a 64-bit operating system, the worker process(es) serving the application pool run in WOW64 (Windows on Windows64) mode. In WOW64 mode, 32-bit processes load only 32-bit applications.

Managed pipeline mode

Configures ASP.NET to run in classic mode as an ISAPI extension or in integrated mode where managed code is integrated into the request-processing pipeline.

Queue length

Maximum number of requests that Http.sys queues for the application pool. When the queue is full, new requests receive a 503 "Service Unavailable" response.

Start automatically

If True, the application pool starts on creation or when IIS starts. Starting an application pool sets this property to True. Stopping an application sets this property to False.

Additional settings for application pool

Additonal parameters to pass to appcmd.exe for application pool configuration.

Additional Parameters

Additional parameters to pass to Web Deploy. For the list of available settings please refer to Web Deploy Command Line Reference. E.g., -enableRule:AppOffline.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the copy was success:

In the Deploy step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

Undeploy

Uses MsDeploy to undeploy an application or site.

MsDeploy is required for this procedure.

ParameterDescription

MS deploy path

Provide the relative or absolute path to the MSDeploy executable.

Web site name

A web site name to undeploy.

Application name

An application name to undeploy. Warning: if not specified, the web site with the name above will be undeployed.

Delete virtual directories?

Deletes the specified Web site or Web application, including any virtual directories and their content.

Strict mode

If checked, the procedure will fail in case the specified web site does not exist.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the copy was success:

The logs will look like thw following:

Using plugin EC-IIS-3.1.0.0
Got parameter "applicationName" with value ""
Got parameter "deleteVirtualDirectories" with value "0"
Got parameter "msdeployPath" with value "msdeploy"
Got parameter "strictMode" with value "0"
Got parameter "websiteName" with value "NetDash"
Wrote command to property cmdLine
Going to run command: "msdeploy" -verb:delete -dest:iisApp="NetDash"
Exit code: 0
STDOUT: Info: Deleting application (NetDash)
Info: Deleting iisApp (NetDash).
Info: Deleting MSDeploy.iisApp (MSDeploy.iisApp).
Total changes: 3 (0 added, 3 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
STDERR: N/A

Deploy advanced

An interface to msdeploy.exe utility.

MsDeploy is required for this procedure.

ParameterDescription

MSDeploy path

Provide the relative or absolute path to the MSDeploy executable.

Verb

Web Deploy operations enable you to gather information from, move, or delete deployment objects like Web sites and Web applications. Web Deploy operations are specified on the command line with the -verb argument. The Web Deploy operations are dump, sync, delete, getDependencies, and getSystemInfo.

Source provider

Providers process specific source or destination data for Web Deploy. For example, the contentPath provider determines how to work with directory, file, site, and application paths. On the Web Deploy command line, the provider name is specified immediately after the -source: or -dest: argument.

Source provider object path

Specifies a path of the provider object. Some providers require a path and some do not. If required, the kind of path depends on the provider.

Source provider settings

Providers can be optionally modified by using provider settings. Provider settings can be added to either a source or a destination by using the general syntax

Destination provider

Providers process specific source or destination data for Web Deploy. For example, the contentPath provider determines how to work with directory, file, site, and application paths. On the Web Deploy command line, the provider name is specified immediately after the -source: or -dest: argument.

Destination provider object path

Specifies a path of the provider object. Some providers require a path and some do not. If required, the kind of path depends on the provider.

Destination provider settings

Providers can be optionally modified by using provider settings. Provider settings can be added to either a source or a destination by using the general syntax

Allow untrusted?

If checked, allows untrusted server certificate when using SSL. .

Pre-sync command

A command to execute before the synchronization on the destination. For instance, net stop a service.

Post-sync command

A command to execute after the synchronization on the destination. For instance, net start a service.

Additional options

Additional options to be passed to msdeploy.exe. E.g. -retryAttempts=5.

Set param file

Applies parameter settings from an XML file. Can be set to file path or file content.

Declare param file

Includes parameter declarations from an XML file. Can be set to file path or file content.

To deploy, select the following highlighted step:

Then, enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the copy was success:

In the Deploy step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

StartAppPool

Starts an IIS application pool.

ParameterDescription

Application pool name

The name of the application pool to start. i.e: 'FirstAppPool'.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the application pool was started successfully:

In the StartAppPool step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

StartWebSite

Starts a website into an IIS Server.

ParameterDescription

Website name

Provide the descriptive name of the website you want to start. i.e: 'Default Web Site'.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the website was started successfully:

In the StartWebSite step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

StopAppPool

Stops an IIS application pool.

ParameterDescription

Application pool name

The name of the application pool to stop. i.e: 'FirstAppPool'.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the application pool was stoped successfully:

In the StopAppPool step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

StopWebSite

Stops a website.

ParameterDescription

Website name

Provide the descriptive name of the website you want to stop. i.e: 'Default Web Site'.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the website was stoped successfully:

In the StopWebSite step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

RecycleAppPool

Recycles the specified application pool.

ParameterDescription

Application pool name

Provide the name of the application pool to be recycled.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the website was stoped successfully:

In the RecycleAppPool step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

AssignAppToAppPool

Assigns an application to an application pool.

ParameterDescription

Application pool name

The name of the Application Pool to assign the application. i.e: 'FirstAppPool'.

Application name

The name of the application to assign. i.e: '/test'.

Site name

The name of the site that contains the app to assign. i.e: 'Default Web Site'.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the application was moved successfully:

In the AssignApp step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

ListSites

List the sites on a web server and writes the retrived data under the specified property.

ParameterDescription

User-defined criterias

The user-defined criterias to search the sites. Blank lists all sites. i.e: '/bindings:http/*:80:'.

Property name

Property to write retrieved data.

Dump format

Choose the format to represent retrieved data. Data can be represented as XML, JSON, raw (just stdout from appcmd.exe) and property sheet (hierarchy).

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the sites detected and started:

In the ListSites step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

Under the specified property you will see extracted sites data.

ListSiteApps

List the apps of a Website.

ParameterDescription

Site name

The name of the site to look for Applications. Blank lists all apps.

Property name

Property to write retrieved data.

Dump format

Choose the format to represent retrieved data. Data can be represented as XML, JSON, raw (just stdout from appcmd.exe) and property sheet (hierarchy).

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the applications detected:

The logs will look like the following:

Using plugin EC-IIS-3.1.0.0
Got parameter "dumpFormat" with value "propertySheet"
Got parameter "propertyName" with value "/myJob/IISApps"
Got parameter "sitename" with value ""
Wrote command to property cmdLine
Going to run command: "C:\WINDOWS\system32\inetsrv\appcmd" list apps
Exit code: 0
STDOUT: APP "Default Web Site/" (applicationPool:DefaultAppPool)
APP "Default Web Site/myApp" (applicationPool:DefaultAppPool)
APP "NetDash/" (applicationPool:NetDash)
APP "MySite/" (applicationPool:DefaultAppPool)
APP "NetDash_25d14fc9-a891-4c5f-bd49-07e73bf1a934/" (applicationPool:DefaultAppPool)
STDERR: N/A
Wrote property: /myJob/IISApps/Default Web Site//applicationPool -> DefaultAppPool
Wrote property: /myJob/IISApps/Default Web Site/myApp/applicationPool -> DefaultAppPool
Wrote property: /myJob/IISApps/MySite//applicationPool -> DefaultAppPool
Wrote property: /myJob/IISApps/NetDash//applicationPool -> NetDash
Wrote property: /myJob/IISApps/NetDash_25d14fc9-a891-4c5f-bd49-07e73bf1a934//applicationPool -> DefaultAppPool

ListAppPools

List the application pools.

ParameterDescription

User-defined criterias

The user-defined criterias to search the application pools. Blank lists all pools. i.e: '/apppool.name:"my pool"'.

Property name

Property to write retrieved data.

Dump format

Choose the format to represent retrieved data. Data can be represented as XML, JSON, raw (just stdout from appcmd.exe) and property sheet (hierarchy).

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the applications detected:

In the ListAppPools step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

ListVirtualDirectories

List the virtual directories.

ParameterDescription

Virtual directory name

Virtual directory name to retrieve. If not provided, will retrieve all the virtual directories.

Property name

Property to write retrieved data.

Dump format

Choose the format to represent retrieved data. Data can be represented as XML, JSON, raw (just stdout from appcmd.exe) and property sheet (hierarchy).

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the applications detected:

The logs will look like the following:

Using plugin EC-IIS-3.1.0.0
Got parameter "dumpFormat" with value "propertySheet"
Got parameter "propertyName" with value "/myJob/IISVirtualDirectories"
Got parameter "vdirName" with value ""
Wrote command to property cmdLine
Going to run command: "C:\WINDOWS\system32\inetsrv\appcmd" list vdirs
Exit code: 0
STDOUT: VDIR "Default Web Site/" (physicalPath:%SystemDrive%\inetpub\wwwroot)
VDIR "Default Web Site/mydir" (physicalPath:C:\tmp\path)
VDIR "Default Web Site/myApp/" (physicalPath:C:\tmp\myApp)
VDIR "NetDash/" (physicalPath:C:\inetpub\NetDash)
VDIR "MySite/" (physicalPath:c:/wrong_dir)
VDIR "NetDash_25d14fc9-a891-4c5f-bd49-07e73bf1a934/" (physicalPath:c:/site_NetDash_25d14fc9-a891-4c5f-bd49-07e73bf1a934)
STDERR: N/A
Wrote property: /myJob/IISVirtualDirectories/Default Web Site//physicalPath -> %SystemDrive%\inetpub\wwwroot
Wrote property: /myJob/IISVirtualDirectories/Default Web Site/myApp//physicalPath -> C:\tmp\myApp
Wrote property: /myJob/IISVirtualDirectories/Default Web Site/mydir/physicalPath -> C:\tmp\path
Wrote property: /myJob/IISVirtualDirectories/MySite//physicalPath -> c:/wrong_dir
Wrote property: /myJob/IISVirtualDirectories/NetDash//physicalPath -> C:\inetpub\NetDash
Wrote property: /myJob/IISVirtualDirectories/NetDash_25d14fc9-a891-4c5f-bd49-07e73bf1a934//physicalPath -> c:/site_NetDash_25d14fc9-a891-4c5f-bd49-07e73bf1a934

AddWebSiteBinding

Adds a binding to a Website.

ParameterDescription

Website Name

The name of the Website to add a binding, i.e: 'Default Web Site'. The site should exist on server.

Binding Protocol

Protocol of the binding to add, e.g. 'http'. Usually the protocol is http or https, for FTP binding please refer to Add a Binding to a Site article.

Binding Information

Information of the binding to add, including the host and the port, e.g.: 'localhost:443', '*:81'.

Host Header

Host headers (also known as domain names or host names) let you assign more than one site to a single IP address on a Web server. E.g., myhost.com.

Enter the following parameters:

When the job is executed, you should see the following job detail, note the output indicating the binding was added successfully:

In the AddWebSiteBinding step, click the Log icon to see the diagnostic info. The output is similar to the following diagnostic report.

Using plugin EC-IIS-3.1.0.0
Got parameter "bindinginformation" with value "*:8080"
Got parameter "bindingprotocol" with value "http"
Got parameter "hostHeader" with value "mysite.com"
Got parameter "websitename" with value "website"
Found binding: protocol http, info: *:80:
Wrote command to property cmdLine
Going to run command: "C:\WINDOWS\system32\inetsrv\appcmd" set site /site.name:"website" /+bindings.[protocol='http',bindingInformation='*:8080:mysite.com']
Exit code: 0
STDOUT: SITE object "website" changed
STDERR: N/A

StopServer

Stops IIS server.

ParameterDescription

Absolute location of the iisreset utility

Provide the absolute path of the script utility used to execute this step. If only 'iisreset' is entered, the 'iisreset' tool must be located on the system path 'c:/windows/system32'. i.e: 'iisreset' or 'c:/MyDir/IISFiles/iisreset.exe'.

Additional parameters

Additional parameters to pass to iisreset utility.

To stop IIS server, enter the following parameters

StartServer

Starts IIS server.

ParameterDescription

Absolute location of the iisreset utility

Provide the absolute path of the script utility used to execute this step. If only 'iisreset' is entered, the 'iisreset' tool must be located on the system path 'c:/windows/system32'. i.e: 'iisreset' or 'c:/MyDir/IISFiles/iisreset.exe'.

Additional parameters

Additional parameters to pass to iisreset utility.

To start IIS server, enter the following parameters

ResetServer

Restarts IIS server.

ParameterDescription

Absolute location of the iisreset utility

Provide the absolute path of the script utility used to execute this step. If only 'iisreset' is entered, the 'iisreset' tool must be located on the system path 'c:/windows/system32'. i.e: 'iisreset' or 'c:/MyDir/IISFiles/iisreset.exe'.

Additional parameters

Additional parameters to pass to iisreset utility.

To restart IIS server, enter the following parameters

AddSSLCertificate

Adds SSL certificate to the specified port or updates if one already exists.

Certificate should be added to IIS certificates storage. Please refer to IIS.NET Forums for instructions.

ParameterDescription

IP

IP address or hostname to add certificate, e.g. 0.0.0.0. Either this parameter or Hostname should be provided.

Hostname

Hostname for the certificate, e.g. mysite.com. Either this parameter or IP should be provided. This parameter is not supported on Windows Server 2008.

Port

Port to add SSL certificate, e.g. 443.

Certificate Store

The name of the certificate store, e.g. My.

Certificate Hash (Thumbprint)

The certificate hash. Can be found in "Server Certificates" tab of IIS console. E.g., 'b4 7c 04 0c 0a 7e fc f5 3f 9e 12 fc df 07 30 ee b1 d6 04 88'. Spaces are not required.

Enter the following parameters:

When the job is executed, you should see the following job detail:

Logs will look like the following:

Using plugin EC-IIS-3.1.0.0
Logs are redirected to property /myJob/debug_logs
Got parameter "certHash" with value "b4 7c 04 0c 0a 7e fc f5 3f 9e 12 fc df 07 30 ee b1 d6 04 88"
Got parameter "certHostName" with value ""
Got parameter "certStore" with value "My"
Got parameter "ip" with value "0.0.0.0"
Got parameter "port" with value "444"
Logs are redirected to property /myJob/debug_logs
Certificate already exists, with hash b47c040c0a7efcf53f9e12fcdf0730eeb1d60488
Going to run command: netsh http update sslcert ipport=0.0.0.0:444 certstore="My" certhash=B47C040C0A7EFCF53F9E12FCDF0730EEB1D60488 appid="{8c12f395-efc4-11e7-8b93-005056a5a0d0}"
Exit code: 0
STDOUT:
SSL Certificate successfully updated

STDERR: N/A

Examples and use cases

Create web site

This example, shows the way to create a web site from the beginning.

First, run the CheckServerStatus with the appropiate parameters to verify the server disponibility:

Now, check the result of the server staus, it must be running:

Now that the server is running, the webSite can be created with these parameters:

Check the result of the creation of the site:

If the creation of the site was successfully, the site can be started with these paramters:

Finally, check that the created application was started successfully:

Known issues

Due to escape issues, double quote (") is not supported in parameter values.

Release notes

EC-IIS 3.1.7

  • The documentation has been migrated to the main documentation site.

EC-IIS 3.1.6

  • Renaming to "CloudBees CD"

EC-IIS 3.1.5

Renaming to "CloudBees"

EC-IIS 3.1.4

  • Configurations can be created by users with "@" sign in a name.

EC-IIS 3.1.3

  • The plugin icon has been updated.

EC-IIS 3.1.2

  • Configured the plugin to allow the ElectricFlow UI to create configs inline of procedure form.

EC-IIS 3.1.1

  • Configured the plugin to allow the ElectricFlow UI to render the plugin procedure parameters entirely using the configured form XMLs.

  • Enabled the plugin for managing the plugin configurations in-line when defining an application process step or a pipeline stage task.

EC-IIS 3.1.0

  • Field "Computer Name" in configuration is deprecated.

  • "Credentials" field was added to "CheckServerStatus" procedure.

  • "Configuration Name" field is no longer required in "CheckServerStatus" procedure.

  • Deploy logic has changed: if no application name is provided to Deploy procedure, but Application Pool parameters are provided, root application of the Web Site (/) is moved into the specified Application Pool and parameters are applied to this application pool.

  • Support for virtual directory credentials was added for CreateWebSite, CreateWebApplication, CreateVirtualDirectory procedures.

  • "Create Directory?" option was added for CreateWebSite, CreateWebApplication, CreateVirtualDirectory procedures.

  • AddSSLCertificate procedure has been added.

EC-IIS 3.0.0

  • Full plugin redesign, IIS from version 7 is now supported.

EC-IIS 2.0.7

  • Fixed issue with configurations being cached for IE.

EC-IIS 2.0.6

  • Renamed ElectricCommander to ElectricFlow.

  • Added link to plugin Configuration Page in plugin step panels.

EC-IIS 2.0.5

  • Fixed manifest file.

  • Removed need for agent/lib directory.

EC-IIS 2.0.4

  • Procedure name(s) were changed in the step picker section

EC-IIS 2.0.3

  • Improves to the help page document.

EC-IIS 2.0.2

  • Improves to the help page document.

EC-IIS 2.0.1

  • Upgrade to use the new Parameter Form XML.

  • Added a link directly to the new help document.

EC-IIS 2.0.0

  • Improve xml parameter panels.

  • New help page format.