New-SPWebApplicationExtension

 

適用版本: SharePoint Foundation 2010, SharePoint Server 2010

上次修改主題的時間: 2015-03-09

為 Web 應用程式建立新的區域執行個體。

Syntax

New-SPWebApplicationExtension [-Identity] <SPWebApplicationPipeBind> -Name <String> -Zone <Default | Intranet | Internet | Custom | Extranet> [-AdditionalClaimProvider <SPClaimProviderPipeBind[]>] [-AllowAnonymousAccess <SwitchParameter>] [-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationMethod <String>] [-AuthenticationProvider <SPAuthenticationProviderPipeBind[]>] [-Confirm [<SwitchParameter>]] [-HostHeader <String>] [-Path <String>] [-Port <UInt32>] [-SecureSocketsLayer <SwitchParameter>] [-SignInRedirectProvider <SPTrustedIdentityTokenIssuerPipeBind>] [-SignInRedirectURL <String>] [-Url <String>] [-WhatIf [<SwitchParameter>]]

詳細描述

New-SPWebApplicationExtension cmdlet 會為 Web 應用程式建立新的區域執行個體。這也稱之為*「擴充」*Web 應用程式,並允許為現有之 Web 應用程式中可用的相同內容,設定備用的權限。

如需 Windows PowerShell for SharePoint 產品的權限及最新資訊,請參閱線上文件 (https://go.microsoft.com/fwlink/?LinkId=163185)。

Parameters

參數 必要 類型 描述

Identity

必要

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

指定要擴充的 Web 應用程式。

Name

必要

System.String

指定 Web 應用程式的新 IIS 網站名稱。

Zone

必要

System.String

指定與此新擴充功能內部 URL 相關聯之五個區域的其中之一。此區域不得為使用中。

此類型必須是下列任一值:DefaultIntranetInternetExtranetCustom

AdditionalClaimProvider

選用

Microsoft.SharePoint.PowerShell.SPClaimProviderPipeBind[]

將特定的宣告提供者新增到定義的 Web 應用程式。

AllowAnonymousAccess

選用

System.Management.Automation.SwitchParameter

允許匿名存取 Web 應用程式區域。

AssignmentCollection

選用

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

為能適當處置物件而管理物件。使用 SPWebSPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。使用 SPWebSPSiteSPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。

注意

使用 Global 參數時,所有物件會包含在全域儲存區內。若未立即使用物件,或未使用 Stop-SPAssignment 命令處置物件,將會發生記憶體不足的狀況。

AuthenticationMethod

選用

字串

使用 KerberosNTLM 指定驗證方法。

AuthenticationProvider

選用

Microsoft.SharePoint.PowerShell.SPAuthenticationProviderPipeBind[]

指定套用到 Web 應用程式的驗證提供者。

Confirm

選用

System.Management.Automation.SwitchParameter

執行命令之前,會先提示您進行確認。如需詳細資訊,請輸入下列命令:get-help about_commonparameters

HostHeader

選用

System.String

指定已指派給必須與備用存取對應設定相關聯之 Web 應用程式的有效 URL,格式為 http://server_name。

HostHeader 參數時,此欄位的值為 Web 應用程式的內部 URL。Url 參數係用於指定公用 URL。

Path

選用

System.String

指定虛擬目錄資料夾中之新網站的實體目錄。此類型為有效的路徑,格式為 C:\Inetpub\wwwroot\MyWebApplication。

Port

選用

System.UInt32

指定應用程式連接埠。可以是任何有效的連接埠號碼。

如果未指定任何連接埠,即會自動產生不衝突的連接埠號碼。

重要

若指定已被指派的連接埠號碼,在您變更新網站或舊網站的連接埠號碼前,IIS 不會啟動新網站。

SecureSocketsLayer

選用

System.Management.Automation.SwitchParameter

為此 Web 應用程式啟用 Secure Sockets Layer (SSL) 加密。若使用 SSL,即必須使用 IIS 管理工具在每部伺服器上新增憑證。在此作業完成之前,您無法由此 IIS 網站存取 Web 應用程式。

SignInRedirectProvider

選用

Microsoft.SharePoint.PowerShell.SPTrustedIdentityTokenIssuerPipeBind

將登入重新導向 URL 設為指向指定之驗證提供者中定義的 URL。

SignInRedirectURL

選用

System.String

指定 Web 應用程式的登入重新導向 URL。

Url

選用

System.String

指定 Web 應用程式區域的負載平衡 URL。

WhatIf

選用

System.Management.Automation.SwitchParameter

顯示訊息描述命令效果,而非描述命令執行的效果。如需詳細資訊,請輸入下列命令:get-help about_commonparameters

輸入類型

傳回類型

Example

------------------範例-----------------------

Get-SPWebApplication http://sitename | New-SPWebApplicationExtension -Name "ExtranetSite" -SecureSocketsLayer -Zone "Extranet" -URL "https://extranet.sitename.com"

此範例會將位於 http://sitename 的指定 Web 應用程式,擴充至 Extranet 區域用於 SSL 用途。

See Also

Reference

Get-SPWebApplication
Set-SPWebApplication