共用方式為


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 網站上執行的適當動作。

建立或更新 將會建立網站或更新現有的網站。

Start、Stop 將會分別啟動或停止網站。


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 - Username
stringWebsitePhysicalPathAuth = WebsiteWindowsAuth && ActionIISWebsite = CreateOrUpdateWebsite時為必要項。

指定將用來存取網站實體路徑的用戶名稱。


WebsiteAuthUserPassword - 密碼
string。 選擇性。 WebsitePhysicalPathAuth = WebsiteWindowsAuth && ActionIISWebsite = CreateOrUpdateWebsite時使用 。

指定將用來存取網站實體路徑的用戶密碼。
最佳做法是在組建或發行管線中建立變數、將其標示為 Secret 來保護它,然後在使用此輸入時提供變數,例如 $(userCredentials)
注意: 密碼中的特殊字元會根據 命令行自變數來解譯。


AddBinding - 新增系結
boolean。 選擇性。 ActionIISWebsite = CreateOrUpdateWebsite時使用 。 預設值:false

指定為網站新增埠系結的選項。


Protocol - 通訊協定
stringIISDeploymentType = randomDeployment時為必要項。 允許的值:httpshttp。 預設值:http

指定網站的 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 版本。 如果指派給此應用程式集區的應用程式不包含 Managed 程式代碼,請從清單中選取 [無 Managed 程式代碼 ] 選項


PipeLineModeForWebsite - Managed 管線模式
stringIISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true時為必要項。 允許的值:IntegratedClassic。 預設值:Integrated

指定 Managed 管線模式,以判斷 IIS 如何處理受控內容的要求。 只有在應用程式集區中的應用程式無法以整合模式執行時,才使用傳統模式。


AppPoolIdentityForWebsite - 身分識別
stringIISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true時為必要項。 允許的值:ApplicationPoolIdentity(應用程式集區身分識別)、LocalService(本地服務)、LocalSystem(本機系統)、NetworkService(網路服務)、SpecificUser(自定義帳戶)。 預設值:ApplicationPoolIdentity

設定應用程式集區背景工作進程執行所在的帳戶。 指定其中一個預先定義的安全性帳戶,或設定自定義帳戶。


AppPoolUsernameForWebsite - Username
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 - Username
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 - Username
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 版本。 如果指派給此應用程式集區的應用程式不包含 Managed 程式代碼,請從清單中選取 [無 Managed 程式代碼 ] 選項


PipeLineModeForApplication - Managed 管線模式
stringIISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true時為必要項。 允許的值:IntegratedClassic。 預設值:Integrated

指定 Managed 管線模式,以判斷 IIS 如何處理受控內容的要求。 只有在應用程式集區中的應用程式無法在整合模式中執行時,才使用傳統模式。


AppPoolIdentityForApplication - 身分識別
stringIISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true時為必要項。 允許的值:ApplicationPoolIdentity(應用程式集區身分識別)、LocalService(本地服務)、LocalSystem(本機系統)、NetworkService(網路服務)、SpecificUser(自定義帳戶)。 預設值:ApplicationPoolIdentity

設定應用程式集區背景工作進程執行所在的帳戶。 指定其中一個預先定義的安全性帳戶,或設定自定義帳戶。


AppPoolUsernameForApplication - Username
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 版本。 如果指派給此應用程式集區的應用程式不包含 Managed 程式代碼,請從清單中選取 [無 Managed 程式代碼 ] 選項


PipeLineMode - Managed 管線模式
stringActionIISApplicationPool = CreateOrUpdateAppPool時為必要項。 允許的值:IntegratedClassic。 預設值:Integrated

指定 Managed 管線模式,以判斷 IIS 如何處理受控內容的要求。 只有在應用程式集區中的應用程式無法在整合模式中執行時,才使用傳統模式。


AppPoolIdentity - 身分識別
stringActionIISApplicationPool = CreateOrUpdateAppPool時為必要項。 允許的值:ApplicationPoolIdentity(應用程式集區身分識別)、LocalService(本地服務)、LocalSystem(本機系統)、NetworkService(網路服務)、SpecificUser(自定義帳戶)。 預設值:ApplicationPoolIdentity

設定應用程式集區背景工作進程執行所在的帳戶。 指定其中一個預先定義的安全性帳戶,或設定自定義帳戶。


AppPoolUsername - Username
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 應用程式、虛擬目錄或應用程式集區。

需求

要求 說明
管線類型 傳統版本
執行於 Agent、DeploymentGroup
需求 沒有
功能 此工作不符合作業中後續工作的任何需求。
命令限制 任意
Settable 變數 任意
代理程式版本 2.111.0 或更新
工作類別 部署