New-SPWebApplicationExtension
为 Web 应用程序创建新区域实例。
语法
New-SPWebApplicationExtension
[-Identity] <SPWebApplicationPipeBind>
-Name <String>
-Zone <SPUrlZone>
[-AdditionalClaimProvider <SPClaimProviderPipeBind[]>]
[-AllowAnonymousAccess]
[-AssignmentCollection <SPAssignmentCollection>]
[-AuthenticationMethod <String>]
[-AuthenticationProvider <SPAuthenticationProviderPipeBind[]>]
[-Confirm]
[-HostHeader <String>]
[-Path <String>]
[-Port <UInt32>]
[-SecureSocketsLayer]
[-SignInRedirectProvider <SPTrustedIdentityTokenIssuerPipeBind>]
[-SignInRedirectURL <String>]
[-Url <String>]
[-WhatIf]
[<CommonParameters>]
说明
cmdlet New-SPWebApplicationExtension
为 Web 应用程序创建新的区域实例。
它也称为扩展 Web 应用程序,并允许为现有 Web 应用程序中可用的相同内容配置备用权限。
有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet。
示例
------------------示例-----------------------
Get-SPWebApplication http://sitename | New-SPWebApplicationExtension -Name "ExtranetSite" -SecureSocketsLayer -Zone "Extranet" -URL "https://extranet.sitename.com"
此示例将 位于 http://sitename 的给定 Web 应用程序扩展到 Extranet 区域以供 SSL 使用。
参数
-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 |
-AllowAnonymousAccess
允许对 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 |
-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 2010, SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 |
-AuthenticationMethod
使用 Kerberos 或 NTLM 可指定身份验证方法。
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 |
-HostHeader
指定分配给 Web 应用程序的有效 URL,该 URL 必须与备用访问映射配置相关联,格式为 http://server_name.
如果存在 HostHeader 参数,则此字段的值为 Web 应用程序的内部 URL。 Url 参数用于指定公用 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 |
-Identity
指定要扩展的 Web 应用程序。
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 |
-Name
指定 Web 应用程序中新 IIS 网站的名称。
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 |
-Path
指定新网站的物理目录(在虚拟目录文件夹中)。 键入的值为 C:\Inetpub\wwwroot\MyWebApplication 形式的有效路径。
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 |
-Port
指定应用程序端口。 可以是任意有效端口号。
如果未指定端口,则自动生成一个非冲突的端口号。
如果指定了已分配的端口号,则直到您更改新网站的端口号或旧网站的端口号时,IIS 才会启动新网站。
Type: | UInt32 |
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 |
-SecureSocketsLayer
对此 Web 应用程序启用安全套接字层 (SSL) 加密。 如果使用 SSL,则必须使用 IIS 管理工具在每个服务器中添加证书。 完成此操作之前,将无法从此 IIS 网站访问 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 |
-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 |
-Url
指定 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 |
-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
指定五个区域中将与此新扩展的内部 URL 关联的区域。 此区域已不能使用。
类型必须是以下任何一个值: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 |