Set-SPWebApplication
設定指定的 Web 應用程式。
Syntax
Set-SPWebApplication
[-Identity] <SPWebApplicationPipeBind>
[-OutgoingEmailAddress <String>]
[-ReplyToEmailAddress <String>]
-SMTPServer <String>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-Force]
[-WhatIf]
[-DisableSMTPEncryption]
[-NotProvisionGlobally]
[-SMTPServerPort <Int32>]
[<CommonParameters>]
Set-SPWebApplication
[-Identity] <SPWebApplicationPipeBind>
-Zone <SPUrlZone>
[-AdditionalClaimProvider <SPClaimProviderPipeBind[]>]
[-AssignmentCollection <SPAssignmentCollection>]
[-AuthenticationMethod <String>]
[-AuthenticationProvider <SPAuthenticationProviderPipeBind[]>]
[-Confirm]
[-Force]
[-SignInRedirectProvider <SPTrustedIdentityTokenIssuerPipeBind>]
[-SignInRedirectURL <String>]
[-WhatIf]
[-NotProvisionGlobally]
[<CommonParameters>]
Set-SPWebApplication
[-Identity] <SPWebApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-Confirm]
[-DefaultQuotaTemplate <String>]
[-DefaultTimeZone <Int32>]
[-Force]
[-ServiceApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>]
[-WhatIf]
[-NotProvisionGlobally]
[<CommonParameters>]
Description
此 Cmdlet 包含一個以上的參數集。 您可能只會使用到一個參數集中的參數,而且您無法合併不同參數集中的參數。 如需如何使用參數集的詳細資訊,請參閱 Cmdlet 參數集。
Cmdlet Set-SPWebApplication
會設定 Identity 參數所指定的 Web 應用程式。
凡是區域特定的設定 (設定 Zone 參數者),都必須提供要設定的區域。
提供的區域必須已經存在。
如需適用於 SharePoint 產品的 Windows PowerShell 權限及最新資訊,請參閱線上文件 SharePoint Server Cmdlet。
範例
例子
$ap = New-SPAuthenticationProvider -AllowAnonymous
Set-SPWebApplication http://somesite -Zone "Extranet" -HostHeader "http://www.contoso.com" -AuthenticationProvider $ap
本範例會將指定 Web 應用程式之外部網路區域的 HostHeader URL 設定為 http://www.contoso.com ,並啟用匿名存取。
參數
-AdditionalClaimProvider
將特定的宣告提供者新增到定義的 Web 應用程式。
Type: | SPClaimProviderPipeBind[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-AssignmentCollection
管理物件以適當處置它們。 使用 SPWeb 或 SPSite 等物件可能會耗用大量的記憶體,因此在 Windows PowerShell 指令碼中使用這些物件時,必須適當地管理記憶體。 您可以使用 SPAssignment 物件將物件指派給變數,並在不需要時處置這些物件,以釋放記憶體。 使用 SPWeb、SPSite 或 SPSiteAdministration 物件時,若未使用指派集合或 Global 參數,將會自動處置這些物件。
使用 Global 參數時,所有物件會包含在全域儲存區內。
如果不立即使用物件,或使用 Stop-SPAssignment
命令加以捨棄,則可能會有記憶體不足的狀況發生。
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-AuthenticationMethod
用以將 Web 應用程式設定為傳統 Windows 驗證。 有效值為 NTLM 或 Kerberos。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-AuthenticationProvider
定義套用到 Web 應用程式的驗證提供者。
Type: | SPAuthenticationProviderPipeBind[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Confirm
在執行命令之前,提示您確認操作。
如需詳細資訊,請輸入下列命令:get-help about_commonparameters
。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DefaultQuotaTemplate
為此 Web 應用程式指定新的預設網站配額範本。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DefaultTimeZone
為此 Web 應用程式的新網站集合指定預設的時區。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-DisableSMTPEncryption
{{填入 DisableSMTPEncryption Description}}
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2016, SharePoint Server 2019 |
-Force
隱藏與 Web 應用程式設定有關的確認訊息。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Identity
指定 Web 應用程式的 URL 名稱。
類型必須是格式為 WebApplication-1212 或 URL 的有效名稱,格式為表單 http://server_name/WebApplicaiton-1212.
Type: | SPWebApplicationPipeBind |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-NotProvisionGlobally
{{Fill NotProvisionGlobally Description}}
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2016, SharePoint Server 2019 |
-OutgoingEmailAddress
為由此 Web 應用程式送出的電子郵件訊息,指定新的傳出電子郵件地址。 類型必須是有效的位址;例如, someone@example.com 。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ReplyToEmailAddress
設定回覆的電子郵件地址。
類型必須是有效的位址;例如, someone@example.com 。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-ServiceApplicationProxyGroup
指定要供 Web 應用程式使用的自訂服務應用程式 Proxy 群組。 Web 應用程式將使用此 Proxy 群組中的 Proxy,以連接至服務應用程式。 如果未指定此參數,則會使用伺服器陣列的預設 Proxy 群組。
Type: | SPServiceApplicationProxyGroupPipeBind |
Aliases: | ProxyGroup |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SignInRedirectProvider
設定登入重新導向 URL 以指向在特定驗證提供者中所定義的 URL。
Type: | SPTrustedIdentityTokenIssuerPipeBind |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SignInRedirectURL
指定 Web 應用程式的登入重新導向 URL。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SMTPServer
指定此 Web 應用程式會使用的新外送 SMTP 伺服器。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-SMTPServerPort
{{填滿 SMTPServerPort 描述}}
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2016, SharePoint Server 2019 |
-WhatIf
顯示訊息會描述命令的功效而不執行命令。
如需詳細資訊,請輸入下列命令:get-help about_commonparameters
。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-Zone
設定區域特定的設定時,必須指定要設定的區域。 此區域必須已經存在。
此類型必須是下列任一個值:Default、Intranet、Internet、Extranet 或 Custom。
Type: | SPUrlZone |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |