Set-SPWebApplication
Published: July 16, 2012
Applies to: SharePoint Foundation 2013 | SharePoint Server 2013 Enterprise
Configures the specified Web application.
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>]]
Parameters
1| Parameter | Required | Type | Description | ||
| Identity | Required | Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind | Specifies the name or URL of the Web application. The type must be a valid name, in the form WebApplication-1212, or URL, in the form http://server_name/WebApplicaiton-1212. | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Confirm | Optional | System.Management.Automation.SwitchParameter | Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters | ||
| DefaultQuotaTemplate | Optional | System.String | Specifies the new default site quota template for this Web application. | ||
| DefaultTimeZone | Optional | System.Int32 | Specifies the default time zone for new site collections in this Web application. | ||
| Force | Optional | System.Management.Automation.SwitchParameter | Suppresses confirmation messages involved in settings for a Web application. | ||
| ServiceApplicationProxyGroup | Optional | Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyGroupPipeBind | Specifies a custom service application proxy group for the Web application to use. The Web application will use the proxies in this proxy group to connect to service applications. If this parameter is not specified, the farm’s default proxy group is used. | ||
| WhatIf | Optional | System.Management.Automation.SwitchParameter | Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters |
| Parameter | Required | Type | Description | ||
| Identity | Required | Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind | Specifies the name or URL of the Web application. The type must be a valid name, in the form WebApplication-1212, or URL, in the form http://server_name/WebApplicaiton-1212. | ||
| Zone | Required | Microsoft.SharePoint.Administration.SPUrlZone | When configuring zone-specific settings, the zone to configure must be specified. This zone must already exist. The type must be any one of the following values: Default, Intranet, Internet, Extranet, or Custom. | ||
| AdditionalClaimProvider | Optional | Microsoft.SharePoint.PowerShell.SPClaimProviderPipeBind[] | Adds a specific claim provider to the defined Web application. | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| AuthenticationMethod | Optional | System.String | Use to set a Web application to classic Windows authentication. The valid values are NTLM or Kerberos. | ||
| AuthenticationProvider | Optional | Microsoft.SharePoint.PowerShell.SPAuthenticationProviderPipeBind[] | Defines the authentication provider(s) that applies to the Web application. | ||
| Confirm | Optional | System.Management.Automation.SwitchParameter | Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters | ||
| Force | Optional | System.Management.Automation.SwitchParameter | Suppresses confirmation messages involved in settings for a Web application. | ||
| SignInRedirectProvider | Optional | Microsoft.SharePoint.PowerShell.SPTrustedIdentityTokenIssuerPipeBind | Sets the sign-in redirect URL to point to the URL that is defined in the specified authentication provider. | ||
| SignInRedirectURL | Optional | System.String | Specifies the sign-in redirect URL for the Web application. | ||
| WhatIf | Optional | System.Management.Automation.SwitchParameter | Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters |
| Parameter | Required | Type | Description | ||
| Identity | Required | Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind | Specifies the name or URL of the Web application. The type must be a valid name, in the form WebApplication-1212, or URL, in the form http://server_name/WebApplicaiton-1212. | ||
| OutgoingEmailAddress | Optional | System.String | Specifies the new outgoing e-mail address for e-mail messages sent from this Web application. The type must be a valid address; for example, someone@example.com. | ||
| ReplyToEmailAddress | Optional | System.String | Configures the reply e-mail address. The type must be a valid address; for example, someone@example.com. | ||
| SMTPServer | Required | System.String | Specifies the new outbound SMTP server that this Web application will use. | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| Confirm | Optional | System.Management.Automation.SwitchParameter | Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters | ||
| Force | Optional | System.Management.Automation.SwitchParameter | Suppresses confirmation messages involved in settings for a Web application. | ||
| WhatIf | Optional | System.Management.Automation.SwitchParameter | Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters |
Detailed Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.
The Set-SPWebApplication cmdlet configures the Web application specified by the Identity parameter. For any settings that are zone-specific (for the Zone parameter set), the zone to configure must be provided. The provided zone must already exist.
Input Types
Return Types
------------------EXAMPLE-----------------------
Get-SPWebApplication http://somesite | Set-SPWebApplication –Zone "Extranet" –HostHeader "http://www.contoso.com" - AllowAnonymousAccess
This example sets the HostHeader URL for the Extranet zone of the given Web application as http://www.contoso.com and enables anonymous access.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |

Note: