Share via


Set-SPWebApplication

 

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

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

設定指定的 Web 應用程式。

Syntax

Set-SPWebApplication [-Identity] <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-DefaultQuotaTemplate <String>] [-DefaultTimeZone <Int32>] [-Force <SwitchParameter>] [-ServiceApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-WhatIf [<SwitchParameter>]]

Set-SPWebApplication [-Identity] <SPWebApplicationPipeBind> -Zone <Default | Intranet | Internet | Custom | Extranet> [-AdditionalClaimProvider <SPClaimProviderPipeBind[]>] [-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationMethod <String>] [-AuthenticationProvider <SPAuthenticationProviderPipeBind[]>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-SignInRedirectProvider <SPTrustedIdentityTokenIssuerPipeBind>] [-SignInRedirectURL <String>] [-WhatIf [<SwitchParameter>]]

Set-SPWebApplication [-Identity] <SPWebApplicationPipeBind> -SMTPServer <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-OutgoingEmailAddress <String>] [-ReplyToEmailAddress <String>] [-WhatIf [<SwitchParameter>]]

詳細描述

Set-SPWebApplication cmdlet 會設定 Identity 參數所指定的 Web 應用程式。凡是區域特定的設定 (設定 Zone 參數者),都必須提供要設定的區域。提供的區域必須已經存在。

Parameters

參數 必要 類型 描述

Identity

必要

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

指定 Web 應用程式的 URL 名稱。

此類型必須是有效的名稱 (格式為 WebApplication-1212) 或 URL (格式為 http://server_name/WebApplicaiton-1212)。

SMTPServer

必要

System.String

指定此 Web 應用程式會使用的新外送 SMTP 伺服器。

Zone

必要

Microsoft.SharePoint.Administration.SPUrlZone

設定區域特定的設定時,必須指定要設定的區域。此區域必須已經存在。

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

AdditionalClaimProvider

選用

Microsoft.SharePoint.PowerShell.SPClaimProviderPipeBind[]

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

AssignmentCollection

選用

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

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

注意

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

AuthenticationProvider

選用

Microsoft.SharePoint.PowerShell.SPAuthenticationProviderPipeBind[]

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

Confirm

選用

System.Management.Automation.SwitchParameter

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

DefaultQuotaTemplate

選用

System.String

為此 Web 應用程式指定新的預設網站配額範本。

DefaultTimeZone

選用

System.Int32

為此 Web 應用程式的新網站集合指定預設的時區。

Force

選用

System.Management.Automation.SwitchParameter

在無任何確認對話方塊情況下強制設定 Web 應用程式。

OutgoingEmailAddress

選用

System.String

為由此 Web 應用程式送出的電子郵件訊息,指定新的傳出電子郵件地址。此類型必須是有效的地址,例如 someone@example.com。

ReplyToEmailAddress

選用

System.String

設定回覆的電子郵件地址。

此類型必須是有效的地址,例如 someone@example.com。

SecureSocketsLayer

選用

System.Management.Automation.SwitchParameter

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

ServiceApplicationProxyGroup

選用

Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyGroupPipeBind

指定要供 Web 應用程式使用的自訂服務應用程式 Proxy 群組。Web 應用程式將使用此 Proxy 群組中的 Proxy,以連接至服務應用程式。如果未指定此參數,將使用伺服器陣列的預設 Proxy 群組。

SignInRedirectProvider

選用

Microsoft.SharePoint.PowerShell.SPTrustedIdentityTokenIssuerPipeBind

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

SignInRedirectURL

選用

System.String

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

WhatIf

選用

System.Management.Automation.SwitchParameter

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

輸入類型

傳回類型

Example

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

Get-SPWebApplication http://somesite | Set-SPWebApplication -Zone "Extranet" - AllowAnonymousAccess

此範例會將指定之 Web 應用程式 Extranet 區域的 URL 設為 https://www.contoso.com,並啟用匿名存取。

See Also

Reference

Get-SPWebApplication
New-SPWebApplication
Remove-SPWebApplication