Set-SPServiceHostConfig
为所有 Web 服务配置一个或多个常见设置。
语法
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>]
说明
此 cmdlet 包含多个参数集。 只能使用一个参数集中的参数,而不能结合使用不同参数集中的参数。 若要详细了解如何使用参数集,请参阅 Cmdlet 参数集。
cmdlet Set- SPServiceHostConfig
为所有 Web 服务配置一个或多个常见设置。
有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet。
示例
------------------示例-----------------------
Set-SPServiceHostConfig -Port 12345
此示例设置 Web 服务的 HTTP 端口。
参数
-AllowLegacyEncryption
指定允许旧版 SSL 和 TLS 协议版本以及密码套件用于此 IIS 网站。 旧式加密比新式加密弱,不建议这样做。
此功能需要 Windows Server 2022 或更高版本。 当 SharePoint 与早期版本的 Windows Server 一起部署时,此功能不可用。
仅当与 SecureSocketsLayer 参数一起使用时,此参数才有效。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-AssignmentCollection
管理对象以便正确进行处理。 使用 SPWeb 或 SPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。 通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。 在使用 SPWeb、SPSite 或 SPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。
使用全局参数时,所有对象均包含在全局存储中。
如果未立即使用对象,或未通过使用 Stop-SPAssignment
命令来处理对象,则可能会发生内存不足的情况。
Type: | SPAssignmentCollection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-Confirm
执行命令前,看到确认提示。 有关详细信息,请键入以下命令:“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
指定 Web 服务的新端口。
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
指定 Web 服务的新安全端口。
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
指定要配置的 Web 服务应用程序的标识。
Type: | SPIisWebServiceSettings |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-ImportSslCertificate
指定要用于安全协议的 SSL 证书。
Type: | X509Certificate2 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-NetTcpPort
设置 Web 服务的 TCP 端口。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-NoWait
有关详细信息,请参阅 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
指定使用当前进程而不是 SharePoint 计时器作业更新 Web 服务应用程序配置。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-SslCertificateStoreName
指定要为安全协议检索的 SSL 证书的证书存储的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-SslCertificateThumbprint
指定用于检索安全协议的 SSL 证书的指纹。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | SharePoint Server Subscription Edition |
-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 Subscription Edition |