Set-SPServiceHostConfig
Published: July 16, 2012
Applies to: SharePoint Foundation 2013 | SharePoint Server 2013 Enterprise
Configures one or more common settings for all Web services.
Set-SPServiceHostConfig [-Identity] <SPIisWebServiceSettings> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-HttpPort <Int32>] [-HttpsPort <Int32>] [-ImportSslCertificate <X509Certificate2>] [-NetTcpPort <Int32>] [-NoWait <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Set-SPServiceHostConfig [-Identity] <SPIisWebServiceSettings> -SslCertificateThumbprint <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-HttpPort <Int32>] [-HttpsPort <Int32>] [-NetTcpPort <Int32>] [-NoWait <SwitchParameter>] [-SslCertificateStoreName <String>] [-WhatIf [<SwitchParameter>]]
Parameters
1| Parameter | Required | Type | Description | ||
| Identity | Required | Microsoft.SharePoint.Administration.SPIisWebServiceSettings | Specifies the identity of the Web service application to configure. | ||
| 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 | ||
| HttpPort | Optional | System.Int32 | Specifies the new port for the Web service. | ||
| HttpsPort | Optional | System.Int32 | Specifies the new secure port for the Web service. | ||
| ImportSslCertificate | Optional | System.Security.Cryptography.X509Certificates.X509Certificate2 | Specifies the SSL Certificate to use for secure protocols. | ||
| NetTcpPort | Optional | System.Int32 | Sets the TCP port for the Web service. | ||
| NoWait | Optional | System.Management.Automation.SwitchParameter | For more information, see TechNet. | ||
| 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.Administration.SPIisWebServiceSettings | Specifies the identity of the Web service application to configure. | ||
| SslCertificateThumbprint | Required | System.String | Specifies the thumbprint of the SSL certificate to retrieve for secure protocols. | ||
| 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 | ||
| HttpPort | Optional | System.Int32 | Specifies the new port for the Web service. | ||
| HttpsPort | Optional | System.Int32 | Specifies the new secure port for the Web service. | ||
| NetTcpPort | Optional | System.Int32 | Sets the TCP port for the Web service. | ||
| NoWait | Optional | System.Management.Automation.SwitchParameter | For more information, see TechNet. | ||
| SslCertificateStoreName | Optional | System.String | Specifies the thumbprint of the SSL certificate to retrieve for secure protocols. | ||
| 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- SPServiceHostConfig cmdlet configures one or more common settings for all Web services.
Input Types
Return Types
------------------EXAMPLE-----------------------
Set-SPServiceHostConfig –Port 12345
This example sets the HTTP port for the Web services.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |

Note: