Set-SPServiceHostConfig

Configures one or more common settings for all web services.

Syntax

Set-SPServiceHostConfig
   [-Identity] <SPIisWebServiceSettings>
   [-HttpPort <Int32>]
   [-HttpsPort <Int32>]
   [-NetTcpPort <Int32>]
   [-ImportSslCertificate <X509Certificate2>]
   [-AllowLegacyEncryption]
   [-NoWait]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-SPServiceHostConfig
   [-Identity] <SPIisWebServiceSettings>
   [-HttpPort <Int32>]
   [-HttpsPort <Int32>]
   [-NetTcpPort <Int32>]
   -SslCertificateThumbprint <String>
   [-SslCertificateStoreName <String>]
   [-AllowLegacyEncryption]
   [-NoWait]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-SPServiceHostConfig
   [-Identity] <SPIisWebServiceSettings>
   -SslCertificateThumbprint <String>
   [-SslCertificateStoreName <String>]
   [-RunInProcess]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

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.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

Examples

------------------EXAMPLE-----------------------

Set-SPServiceHostConfig -Port 12345

This example sets the HTTP port for the web services.

Parameters

-AllowLegacyEncryption

Specifies that older SSL and TLS protocol versions and cipher suites are allowed to be used with this IIS website. Legacy encryption is weaker than modern encryption and is not recommended.

This feature requires Windows Server 2022 or higher. This feature is not available when SharePoint is deployed with earlier versions of Windows Server.

This parameter is only valid when used with the SecureSocketsLayer parameter.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-AssignmentCollection

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.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Confirm

Prompts you for confirmation before executing the command. For more information, type the following command: `get-help about_commonparameters`

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-HttpPort

Specifies the new port for the web service.

Type:Int32
Aliases:Port
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-HttpsPort

Specifies the new secure port for the web service.

Type:Int32
Aliases:SecurePort
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identity

Specifies the identity of the web service application to configure.

Type:SPIisWebServiceSettings
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-ImportSslCertificate

Specifies the SSL Certificate to use for secure protocols.

Type:X509Certificate2
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-NetTcpPort

Sets the TCP port for the web service.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-NoWait

For more information, see TechNet.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-RunInProcess

Specifies to update the web service application configuration using the current process instead of a SharePoint Timer job.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-SslCertificateStoreName

Specifies the name of the certificate store containing the SSL certificate to retrieve for secure protocols.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-SslCertificateThumbprint

Specifies the thumbprint of the SSL certificate to retrieve for secure protocols.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition