IISWebAppManagementOnMachineGroup@0 - IIS Web 应用管理 v0 任务

使用此任务可创建或更新网站、Web 应用、虚拟目录或应用程序池。

语法

# IIS web app manage v0
# Create or update websites, web apps, virtual directories, or application pools.
- task: IISWebAppManagementOnMachineGroup@0
  inputs:
    #EnableIIS: false # boolean. Enable IIS. Default: false.
    IISDeploymentType: 'IISWebsite' # 'IISWebsite' | 'IISWebApplication' | 'IISVirtualDirectory' | 'IISApplicationPool'. Required. Configuration type. Default: IISWebsite.
    ActionIISWebsite: 'CreateOrUpdateWebsite' # 'CreateOrUpdateWebsite' | 'StartWebsite' | 'StopWebsite'. Required when IISDeploymentType = IISWebsite. Action. Default: CreateOrUpdateWebsite.
    #ActionIISApplicationPool: 'CreateOrUpdateAppPool' # 'CreateOrUpdateAppPool' | 'StartAppPool' | 'StopAppPool' | 'RecycleAppPool'. Required when IISDeploymentType = IISApplicationPool. Action. Default: CreateOrUpdateAppPool.
    #StartStopWebsiteName: # string. Required when ActionIISWebsite = StartWebsite || ActionIISWebsite = StopWebsite. Website name. 
    #Protocol: 'http' # 'https' | 'http'. Required when IISDeploymentType = randomDeployment. Protocol. Default: http.
    #IPAddress: 'All Unassigned' # string. Required when IISDeploymentType = randomDeployment. IP address. Default: All Unassigned.
    #Port: '80' # string. Required when IISDeploymentType = randomDeployment. Port. Default: 80.
    #ServerNameIndication: false # boolean. Optional. Use when IISDeploymentType = randomDeployment. Server Name Indication required. Default: false.
    #HostNameWithOutSNI: # string. Optional. Use when IISDeploymentType = randomDeployment. Host name. 
    #HostNameWithHttp: # string. Optional. Use when IISDeploymentType = randomDeployment. Host name. 
    #HostNameWithSNI: # string. Required when IISDeploymentType = randomDeployment. Host name. 
    #SSLCertThumbPrint: # string. Required when IISDeploymentType = randomDeployment. SSL certificate thumbprint. 
    #StartStopRecycleAppPoolName: # string. Required when ActionIISApplicationPool = StartAppPool || ActionIISApplicationPool = StopAppPool || ActionIISApplicationPool = RecycleAppPool. Application pool name. 
  # IIS Website
    WebsiteName: # string. Required when ActionIISWebsite = CreateOrUpdateWebsite. Website name. 
    WebsitePhysicalPath: '%SystemDrive%\inetpub\wwwroot' # string. Required when ActionIISWebsite = CreateOrUpdateWebsite. Physical path. Default: %SystemDrive%\inetpub\wwwroot.
    WebsitePhysicalPathAuth: 'WebsiteUserPassThrough' # 'WebsiteUserPassThrough' | 'WebsiteWindowsAuth'. Required when ActionIISWebsite = CreateOrUpdateWebsite. Physical path authentication. Default: WebsiteUserPassThrough.
    #WebsiteAuthUserName: # string. Required when WebsitePhysicalPathAuth = WebsiteWindowsAuth && ActionIISWebsite = CreateOrUpdateWebsite. Username. 
    #WebsiteAuthUserPassword: # string. Optional. Use when WebsitePhysicalPathAuth = WebsiteWindowsAuth && ActionIISWebsite = CreateOrUpdateWebsite. Password. 
    #AddBinding: false # boolean. Optional. Use when ActionIISWebsite = CreateOrUpdateWebsite. Add binding. Default: false.
    #CreateOrUpdateAppPoolForWebsite: false # boolean. Optional. Use when ActionIISWebsite = CreateOrUpdateWebsite. Create or update app pool. Default: false.
    #ConfigureAuthenticationForWebsite: false # boolean. Optional. Use when ActionIISWebsite = CreateOrUpdateWebsite. Configure authentication. Default: false.
  # IIS Bindings
    #Bindings: # string. Required when IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && AddBinding = true. Add bindings. 
  # IIS Application pool
    #AppPoolNameForWebsite: # string. Required when IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true. Name. 
    #DotNetVersionForWebsite: 'v4.0' # 'v4.0' | 'v2.0' | 'No Managed Code'. Required when IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true. .NET version. Default: v4.0.
    #PipeLineModeForWebsite: 'Integrated' # 'Integrated' | 'Classic'. Required when IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true. Managed pipeline mode. Default: Integrated.
    #AppPoolIdentityForWebsite: 'ApplicationPoolIdentity' # 'ApplicationPoolIdentity' | 'LocalService' | 'LocalSystem' | 'NetworkService' | 'SpecificUser'. Required when IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true. Identity. Default: ApplicationPoolIdentity.
    #AppPoolUsernameForWebsite: # string. Required when AppPoolIdentityForWebsite = SpecificUser && IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true. Username. 
    #AppPoolPasswordForWebsite: # string. Optional. Use when AppPoolIdentityForWebsite = SpecificUser && IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true. Password. 
  # IIS Authentication
    #AnonymousAuthenticationForWebsite: false # boolean. Optional. Use when IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && ConfigureAuthenticationForWebsite = true. Anonymous authentication. Default: false.
    #BasicAuthenticationForWebsite: false # boolean. Optional. Use when IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && ConfigureAuthenticationForWebsite = true. Basic authentication. Default: false.
    #WindowsAuthenticationForWebsite: true # boolean. Optional. Use when IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && ConfigureAuthenticationForWebsite = true. Windows authentication. Default: true.
  # IIS Virtual directory
    #ParentWebsiteNameForVD: # string. Required when IISDeploymentType = IISVirtualDirectory. Parent website name. 
    #VirtualPathForVD: # string. Required when IISDeploymentType = IISVirtualDirectory. Virtual path. 
    #PhysicalPathForVD: '%SystemDrive%\inetpub\wwwroot' # string. Required when IISDeploymentType = IISVirtualDirectory. Physical path. Default: %SystemDrive%\inetpub\wwwroot.
    #VDPhysicalPathAuth: 'VDUserPassThrough' # 'VDUserPassThrough' | 'VDWindowsAuth'. Optional. Use when IISDeploymentType = IISVirtualDirectory. Physical path authentication. Default: VDUserPassThrough.
    #VDAuthUserName: # string. Required when VDPhysicalPathAuth = VDWindowsAuth && IISDeploymentType = IISVirtualDirectory. Username. 
    #VDAuthUserPassword: # string. Optional. Use when VDPhysicalPathAuth = VDWindowsAuth && IISDeploymentType = IISVirtualDirectory. Password. 
  # IIS Application
    #ParentWebsiteNameForApplication: # string. Required when IISDeploymentType = IISWebApplication. Parent website name. 
    #VirtualPathForApplication: # string. Required when IISDeploymentType = IISWebApplication. Virtual path. 
    #PhysicalPathForApplication: '%SystemDrive%\inetpub\wwwroot' # string. Required when IISDeploymentType = IISWebApplication. Physical path. Default: %SystemDrive%\inetpub\wwwroot.
    #ApplicationPhysicalPathAuth: 'ApplicationUserPassThrough' # 'ApplicationUserPassThrough' | 'ApplicationWindowsAuth'. Optional. Use when IISDeploymentType = IISWebApplication. Physical path authentication. Default: ApplicationUserPassThrough.
    #ApplicationAuthUserName: # string. Required when ApplicationPhysicalPathAuth = ApplicationWindowsAuth && IISDeploymentType = IISWebApplication. Username. 
    #ApplicationAuthUserPassword: # string. Optional. Use when ApplicationPhysicalPathAuth = ApplicationWindowsAuth && IISDeploymentType = IISWebApplication. Password. 
    #CreateOrUpdateAppPoolForApplication: false # boolean. Optional. Use when IISDeploymentType = IISWebApplication. Create or update app pool. Default: false.
  # IIS Application pool
    #AppPoolNameForApplication: # string. Required when IISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true. Name. 
    #DotNetVersionForApplication: 'v4.0' # 'v4.0' | 'v2.0' | 'No Managed Code'. Required when IISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true. .NET version. Default: v4.0.
    #PipeLineModeForApplication: 'Integrated' # 'Integrated' | 'Classic'. Required when IISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true. Managed pipeline mode. Default: Integrated.
    #AppPoolIdentityForApplication: 'ApplicationPoolIdentity' # 'ApplicationPoolIdentity' | 'LocalService' | 'LocalSystem' | 'NetworkService' | 'SpecificUser'. Required when IISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true. Identity. Default: ApplicationPoolIdentity.
    #AppPoolUsernameForApplication: # string. Required when AppPoolIdentityForApplication = SpecificUser && IISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true. Username. 
    #AppPoolPasswordForApplication: # string. Optional. Use when AppPoolIdentityForApplication = SpecificUser && IISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true. Password. 
  # IIS Application pool
    AppPoolName: # string. Required when ActionIISApplicationPool = CreateOrUpdateAppPool. Name. 
    DotNetVersion: 'v4.0' # 'v4.0' | 'v2.0' | 'No Managed Code'. Required when ActionIISApplicationPool = CreateOrUpdateAppPool. .NET version. Default: v4.0.
    PipeLineMode: 'Integrated' # 'Integrated' | 'Classic'. Required when ActionIISApplicationPool = CreateOrUpdateAppPool. Managed pipeline mode. Default: Integrated.
    AppPoolIdentity: 'ApplicationPoolIdentity' # 'ApplicationPoolIdentity' | 'LocalService' | 'LocalSystem' | 'NetworkService' | 'SpecificUser'. Required when ActionIISApplicationPool = CreateOrUpdateAppPool. Identity. Default: ApplicationPoolIdentity.
    #AppPoolUsername: # string. Required when AppPoolIdentity = SpecificUser && ActionIISApplicationPool = CreateOrUpdateAppPool. Username. 
    #AppPoolPassword: # string. Optional. Use when AppPoolIdentity = SpecificUser && ActionIISApplicationPool = CreateOrUpdateAppPool. Password. 
  # Advanced
    #AppCmdCommands: # string. Additional appcmd.exe commands.

输入

EnableIIS - 启用 IIS
boolean。 默认值:false

如果要在计算机上安装 IIS,请设置为 true


IISDeploymentType - 配置类型
string。 必填。 允许的值:IISWebsite(IIS 网站)、IISWebApplication(IIS Web 应用程序)、IISVirtualDirectory(IIS 虚拟目录)、IISApplicationPool(IIS 应用程序池)。 默认值:IISWebsite

指定配置类型:网站、Web 应用程序、虚拟目录或应用程序池。


ActionIISWebsite - 操作
stringIISDeploymentType = IISWebsite时是必需的。 允许的值:CreateOrUpdateWebsite(创建或更新)、StartWebsite(开始)、StopWebsite(停止)。 默认值:CreateOrUpdateWebsite

指定要在 IIS 网站上执行的作。

创建或更新 将创建网站或更新现有网站。

启动、停止 将分别启动或停止网站。


ActionIISApplicationPool - 操作
stringIISDeploymentType = IISApplicationPool时是必需的。 允许的值:CreateOrUpdateAppPool(创建或更新)、StartAppPool(开始)、StopAppPool(停止)、RecycleAppPool(回收)。 默认值:CreateOrUpdateAppPool

指定要在 IIS 应用程序池上执行的作。

创建或更新 将创建应用程序池或更新现有应用程序池。

启动、停止、回收 将分别启动、停止或回收应用程序池。


StartStopWebsiteName - 网站名称
stringActionIISWebsite = StartWebsite || ActionIISWebsite = StopWebsite时是必需的。

指定 IIS 网站的名称。


WebsiteName - 网站名称
stringActionIISWebsite = CreateOrUpdateWebsite时是必需的。

指定要创建或更新的 IIS 网站的名称。


WebsitePhysicalPath - 物理路径
stringActionIISWebsite = CreateOrUpdateWebsite时是必需的。 默认值:%SystemDrive%\inetpub\wwwroot

指定将存储网站内容的物理路径。 内容可以驻留在本地计算机、远程目录或网络共享上,例如 C:\Fabrikam\\ContentShare\Fabrikam


WebsitePhysicalPathAuth - 物理路径身份验证
stringActionIISWebsite = CreateOrUpdateWebsite时是必需的。 允许的值:WebsiteUserPassThrough(应用程序用户(直通))、WebsiteWindowsAuth(Windows 身份验证)。 默认值:WebsiteUserPassThrough

指定将用于访问网站物理路径的身份验证机制。


WebsiteAuthUserName - 用户名
stringWebsitePhysicalPathAuth = WebsiteWindowsAuth && ActionIISWebsite = CreateOrUpdateWebsite时是必需的。

指定将用于访问网站物理路径的用户名。


WebsiteAuthUserPassword - 密码
string。 可选。 当 WebsitePhysicalPathAuth = WebsiteWindowsAuth && ActionIISWebsite = CreateOrUpdateWebsite时使用。

指定将用于访问网站物理路径的用户密码。
最佳做法是在生成或发布管道中创建变量,将其标记为 Secret 来保护它,然后在使用此输入时提供变量,例如 $(userCredentials)
注意: 根据 命令行参数解释密码中的特殊字符。


AddBinding - 添加绑定
boolean。 可选。 当 ActionIISWebsite = CreateOrUpdateWebsite时使用。 默认值:false

指定为网站添加端口绑定的选项。


Protocol - 协议
stringIISDeploymentType = randomDeployment时是必需的。 允许的值:httpshttp。 默认值:http

为网站指定 HTTP 绑定,或者为网站指定具有安全套接字层 (SSL) 绑定的 HTTPS。


IPAddress - IP 地址
stringIISDeploymentType = randomDeployment时是必需的。 默认值:All Unassigned

指定最终用户可用于访问此网站的 IP 地址。
如果选择 所有未分配,则网站将响应端口和主机名上所有 IP 地址的请求。 如果服务器上的另一个网站在同一端口上具有绑定,但具有特定 IP 地址,则网站不会响应请求。


Port - 端口
stringIISDeploymentType = randomDeployment时是必需的。 默认值:80

指定超文本传输协议堆栈(HTTP.sys)将监视网站请求的端口。


需要ServerNameIndication - 服务器名称指示
boolean。 可选。 当 IISDeploymentType = randomDeployment时使用。 默认值:false

指定为网站设置服务器名称指示(SNI)的选项。
SNI 扩展 SSL 和 TLS 协议,以指示客户端尝试连接到的主机名。 它允许具有不同证书的多个安全网站使用相同的 IP 地址。


HostNameWithOutSNI - 主机名
string。 可选。 当 IISDeploymentType = randomDeployment时使用。

指定网站的主机名(或域名)。
如果指定了主机名,客户端必须使用主机名而不是 IP 地址来访问网站。


HostNameWithHttp - 主机名
string。 可选。 当 IISDeploymentType = randomDeployment时使用。

指定网站的主机名(或域名)。
如果指定了主机名,客户端必须使用主机名而不是 IP 地址来访问网站。


HostNameWithSNI - 主机名
stringIISDeploymentType = randomDeployment时是必需的。

指定网站的主机名(或域名)。
如果指定了主机名,客户端必须使用主机名而不是 IP 地址来访问网站。


SSLCertThumbPrint - SSL 证书指纹
stringIISDeploymentType = randomDeployment时是必需的。

指定网站用于 HTTPS 通信的安全套接字层证书的指纹。 指纹是 40 个字符长的十六进制字符串。 SSL 证书应已安装在本地计算机个人存储区中的计算机上。


Bindings - 添加绑定
stringIISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && AddBinding = true时是必需的。

指定网站的绑定。

下面是 YAML 中的示例绑定配置:

Bindings: |
  {
      bindings:[
          {
              "protocol":"https",
              "ipAddress":"",
              "hostname":"my.hostname.com",
              "port":"443",
              "sslThumbprint":"",
              "sniFlag":true
          }
      ]
  }

CreateOrUpdateAppPoolForWebsite - 创建或更新应用池
boolean。 可选。 当 ActionIISWebsite = CreateOrUpdateWebsite时使用。 默认值:false

指定用于创建或更新应用程序池的选项。 如果选中,将在指定的应用程序池中创建网站。


ConfigureAuthenticationForWebsite - 配置身份验证
boolean。 可选。 当 ActionIISWebsite = CreateOrUpdateWebsite时使用。 默认值:false

指定为网站配置身份验证的选项。


AppPoolNameForWebsite - 名称
stringIISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true时是必需的。

指定要创建或更新的 IIS 应用程序池的名称。


DotNetVersionForWebsite - .NET 版本
stringIISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true时是必需的。 允许的值:v4.0v2.0No Managed Code。 默认值:v4.0

指定应用程序池加载的 .NET Framework 的版本。 如果分配给此应用程序池的应用程序不包含托管代码,请从列表中选择 “无托管代码” 选项。


PipeLineModeForWebsite - 托管管道模式
stringIISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true时是必需的。 允许的值:IntegratedClassic。 默认值:Integrated

指定托管管道模式,以确定 IIS 如何处理托管内容的请求。 仅当应用程序池中的应用程序无法在集成模式下运行时,才使用经典模式。


AppPoolIdentityForWebsite - 标识
stringIISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true时是必需的。 允许的值:ApplicationPoolIdentity(应用程序池标识)、LocalService(本地服务)、LocalSystem(本地系统)、NetworkService(网络服务)、SpecificUser(自定义帐户)。 默认值:ApplicationPoolIdentity

配置运行应用程序池工作进程时所依据的帐户。 指定预定义的安全帐户之一或配置自定义帐户。


AppPoolUsernameForWebsite - 用户名
stringAppPoolIdentityForWebsite = SpecificUser && IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true时是必需的。

指定要使用的自定义帐户的用户名。


AppPoolPasswordForWebsite - 密码
string。 可选。 当 AppPoolIdentityForWebsite = SpecificUser && IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true时使用。

指定自定义帐户的密码。
最佳做法是在生成或发布管道中创建变量,将其标记为 Secret 来保护它,然后在使用此输入时提供变量,例如 $(userCredentials)
注意: 根据 命令行参数解释密码中的特殊字符。


AnonymousAuthenticationForWebsite - 匿名身份验证
boolean。 可选。 当 IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && ConfigureAuthenticationForWebsite = true时使用。 默认值:false

指定为网站启用匿名身份验证的选项。


BasicAuthenticationForWebsite - 基本身份验证
boolean。 可选。 当 IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && ConfigureAuthenticationForWebsite = true时使用。 默认值:false

指定为网站启用基本身份验证的选项。


WindowsAuthenticationForWebsite - Windows 身份验证
boolean。 可选。 当 IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && ConfigureAuthenticationForWebsite = true时使用。 默认值:true

指定为网站启用 Windows 身份验证的选项。


ParentWebsiteNameForVD - 父网站名称
stringIISDeploymentType = IISVirtualDirectory时是必需的。

指定虚拟目录的父网站的名称。


VirtualPathForVD - 虚拟路径
stringIISDeploymentType = IISVirtualDirectory时是必需的。

指定虚拟目录的虚拟路径。

例如,若要创建虚拟目录 Site/Application/VDir,请输入 /Application/Vdir。 父网站和应用程序应已存在。


PhysicalPathForVD - 物理路径
stringIISDeploymentType = IISVirtualDirectory时是必需的。 默认值:%SystemDrive%\inetpub\wwwroot

指定虚拟目录内容存储的物理路径。 内容可以驻留在本地计算机、远程目录或网络共享上,例如 C:\Fabrikam\\ContentShare\Fabrikam


VDPhysicalPathAuth - 物理路径身份验证
string。 可选。 当 IISDeploymentType = IISVirtualDirectory时使用。 允许的值:VDUserPassThrough(应用程序用户(直通))、VDWindowsAuth(Windows 身份验证)。 默认值:VDUserPassThrough

指定用于访问虚拟目录的物理路径的身份验证机制。


VDAuthUserName - 用户名
stringVDPhysicalPathAuth = VDWindowsAuth && IISDeploymentType = IISVirtualDirectory时是必需的。

指定用于访问虚拟目录的物理路径的用户名。


VDAuthUserPassword - 密码
string。 可选。 当 VDPhysicalPathAuth = VDWindowsAuth && IISDeploymentType = IISVirtualDirectory时使用。

指定用于访问虚拟目录的物理路径的用户密码。
最佳做法是在生成或发布管道中创建变量,将其标记为 Secret 来保护它,然后在使用此输入时提供变量,例如 $(userCredentials)
注意: 根据 命令行参数解释密码中的特殊字符。


ParentWebsiteNameForApplication - 父网站名称
stringIISDeploymentType = IISWebApplication时是必需的。

指定将在其中创建或更新应用程序的父网站的名称。


VirtualPathForApplication - 虚拟路径
stringIISDeploymentType = IISWebApplication时是必需的。

指定应用程序的虚拟路径。

例如,若要创建应用程序 Site/Application,请输入 /Application。 父网站应已存在。


PhysicalPathForApplication - 物理路径
stringIISDeploymentType = IISWebApplication时是必需的。 默认值:%SystemDrive%\inetpub\wwwroot

指定存储应用程序内容的物理路径。 内容可以驻留在本地计算机、远程目录或网络共享上,例如 C:\Fabrikam\\ContentShare\Fabrikam


ApplicationPhysicalPathAuth - 物理路径身份验证
string。 可选。 当 IISDeploymentType = IISWebApplication时使用。 允许的值:ApplicationUserPassThrough(应用程序用户(直通))、ApplicationWindowsAuth(Windows 身份验证)。 默认值:ApplicationUserPassThrough

指定用于访问应用程序物理路径的身份验证机制。


ApplicationAuthUserName - 用户名
stringApplicationPhysicalPathAuth = ApplicationWindowsAuth && IISDeploymentType = IISWebApplication时是必需的。

指定用于访问应用程序物理路径的用户名。


ApplicationAuthUserPassword - 密码
string。 可选。 当 ApplicationPhysicalPathAuth = ApplicationWindowsAuth && IISDeploymentType = IISWebApplication时使用。

指定用于访问应用程序物理路径的用户密码。
最佳做法是在生成或发布管道中创建变量,将其标记为 Secret 来保护它,然后在使用此输入时提供变量,例如 $(userCredentials)
注意: 根据 命令行参数解释密码中的特殊字符。


CreateOrUpdateAppPoolForApplication - 创建或更新应用池
boolean。 可选。 当 IISDeploymentType = IISWebApplication时使用。 默认值:false

指定用于创建或更新应用程序池的选项。 如果选中,将在指定的应用程序池中创建应用程序。


AppPoolNameForApplication - 名称
stringIISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true时是必需的。

指定要创建或更新的 IIS 应用程序池的名称。


DotNetVersionForApplication - .NET 版本
stringIISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true时是必需的。 允许的值:v4.0v2.0No Managed Code。 默认值:v4.0

指定应用程序池加载的 .NET Framework 的版本。 如果分配给此应用程序池的应用程序不包含托管代码,请从列表中选择 “无托管代码” 选项。


PipeLineModeForApplication - 托管管道模式
stringIISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true时是必需的。 允许的值:IntegratedClassic。 默认值:Integrated

指定托管管道模式,以确定 IIS 如何处理托管内容的请求。 仅当应用程序池中的应用程序无法在集成模式下运行时,才使用经典模式。


AppPoolIdentityForApplication - 标识
stringIISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true时是必需的。 允许的值:ApplicationPoolIdentity(应用程序池标识)、LocalService(本地服务)、LocalSystem(本地系统)、NetworkService(网络服务)、SpecificUser(自定义帐户)。 默认值:ApplicationPoolIdentity

配置运行应用程序池工作进程时所依据的帐户。 指定预定义的安全帐户之一或配置自定义帐户。


AppPoolUsernameForApplication - 用户名
stringAppPoolIdentityForApplication = SpecificUser && IISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true时是必需的。

指定要使用的自定义帐户的用户名。


AppPoolPasswordForApplication - 密码
string。 可选。 当 AppPoolIdentityForApplication = SpecificUser && IISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true时使用。

指定自定义帐户的密码。
最佳做法是在生成或发布管道中创建变量,将其标记为 Secret 来保护它,然后在使用此输入时提供变量,例如 $(userCredentials)
注意: 根据 命令行参数解释密码中的特殊字符。


AppPoolName - 名称
stringActionIISApplicationPool = CreateOrUpdateAppPool时是必需的。

指定要创建或更新的 IIS 应用程序池的名称。


DotNetVersion - .NET 版本
stringActionIISApplicationPool = CreateOrUpdateAppPool时是必需的。 允许的值:v4.0v2.0No Managed Code。 默认值:v4.0

指定应用程序池加载的 .NET Framework 的版本。 如果分配给此应用程序池的应用程序不包含托管代码,请从列表中选择 “无托管代码” 选项。


PipeLineMode - 托管管道模式
stringActionIISApplicationPool = CreateOrUpdateAppPool时是必需的。 允许的值:IntegratedClassic。 默认值:Integrated

指定托管管道模式,以确定 IIS 如何处理托管内容的请求。 仅当应用程序池中的应用程序无法在集成模式下运行时,才使用经典模式。


AppPoolIdentity - 标识
stringActionIISApplicationPool = CreateOrUpdateAppPool时是必需的。 允许的值:ApplicationPoolIdentity(应用程序池标识)、LocalService(本地服务)、LocalSystem(本地系统)、NetworkService(网络服务)、SpecificUser(自定义帐户)。 默认值:ApplicationPoolIdentity

配置运行应用程序池工作进程时所依据的帐户。 指定预定义的安全帐户之一或配置自定义帐户。


AppPoolUsername - 用户名
stringAppPoolIdentity = SpecificUser && ActionIISApplicationPool = CreateOrUpdateAppPool时是必需的。

指定要使用的自定义帐户的用户名。


AppPoolPassword - 密码
string。 可选。 当 AppPoolIdentity = SpecificUser && ActionIISApplicationPool = CreateOrUpdateAppPool时使用。

指定自定义帐户的密码。
最佳做法是在生成或发布管道中创建变量,将其标记为 Secret 来保护它,然后在使用此输入时提供变量,例如 $(userCredentials)
注意: 根据 命令行参数解释密码中的特殊字符。


StartStopRecycleAppPoolName - 应用程序池名称
stringActionIISApplicationPool = StartAppPool || ActionIISApplicationPool = StopAppPool || ActionIISApplicationPool = RecycleAppPool时是必需的。

指定 IIS 应用程序池的名称。


AppCmdCommands - 其他 appcmd.exe 命令
string

指定其他 AppCmd.exe 命令。 对于多个命令,请使用行分隔符。
例如:
list apppools
list sites
recycle apppool /apppool.name:ExampleAppPoolName


任务控制选项

除任务输入之外,所有任务都具有控制选项。 有关详细信息,请参阅 控件选项和常见任务属性

输出变量

没有。

注解

使用此任务可创建或更新网站、Web 应用、虚拟目录或应用程序池。

要求

要求 说明
管道类型 经典版本
运行时间 代理,DeploymentGroup
需求 没有
功能 此任务不满足作业中后续任务的任何要求。
命令限制 任何
Settable 变量 任何
代理版本 2.111.0 或更高版本
任务类别 部署