New-SPWebApplicationExtension

为 Web 应用程序创建新区域实例。

语法

Default (默认值)

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

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

向定义的 Web 应用程序添加特定声明提供程序。

参数属性

类型:

SPClaimProviderPipeBind[]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-AllowAnonymousAccess

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

允许对 Web 应用程序区域进行匿名访问。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-AssignmentCollection

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

管理对象以便正确进行处理。 使用 SPWeb 或 SPSite 等对象可能会耗用大量内存,而且在 Windows PowerShell 脚本中使用这些对象需要正确管理内存。 通过使用 SPAssignment 对象,可以将对象分配给变量,然后在不需要这些对象时对它们进行处理,以释放内存。 在使用 SPWeb、SPSite 或 SPSiteAdministration 对象时,如果不使用分配集合或 Global 参数,则会自动处理这些对象。

使用全局参数时,所有对象均包含在全局存储中。 如果未立即使用对象,或未通过使用 Stop-SPAssignment 命令来处理对象,则可能会发生内存不足的情况。

参数属性

类型:SPAssignmentCollection
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-AuthenticationMethod

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

使用 Kerberos 或 NTLM 可指定身份验证方法。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-AuthenticationProvider

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定适用于 Web 应用程序的验证提供程序。

参数属性

类型:

SPAuthenticationProviderPipeBind[]

默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Confirm

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

执行命令前,看到确认提示。 有关详细信息,请键入以下命令:get-help about_commonparameters

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-HostHeader

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定分配给 Web 应用程序的有效 URL,该 URL 必须与备用访问映射配置相关联,格式为 http://server_name.

如果存在 HostHeader 参数,则此字段的值为 Web 应用程序的内部 URL。 Url 参数用于指定公用 URL。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Identity

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定要扩展的 Web 应用程序。

参数属性

类型:SPWebApplicationPipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:1
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Name

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定 Web 应用程序中新 IIS 网站的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Path

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定新网站的物理目录(在虚拟目录文件夹中)。 键入的值为 C:\Inetpub\wwwroot\MyWebApplication 形式的有效路径。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Port

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定应用程序端口。 可以是任意有效端口号。

如果未指定端口,则自动生成一个非冲突的端口号。

如果指定了已分配的端口号,则直到您更改新网站的端口号或旧网站的端口号时,IIS 才会启动新网站。

参数属性

类型:UInt32
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SecureSocketsLayer

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

对此 Web 应用程序启用安全套接字层 (SSL) 加密。 如果使用 SSL,则必须使用 IIS 管理工具在每个服务器中添加证书。 完成此操作之前,将无法从此 IIS 网站访问 Web 应用程序。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SignInRedirectProvider

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

设置登录重定向 URL,使其指向在指定验证提供程序中定义的 URL。

参数属性

类型:SPTrustedIdentityTokenIssuerPipeBind
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SignInRedirectURL

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定 Web 应用程序的登录重定向 URL。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Url

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定 Web 应用程序区域的负载平衡 URL。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

显示一条描述命令作用的消息,而不执行命令。 有关详细信息,请键入以下命令:get-help about_commonparameters

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:无线

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Zone

适用:SharePoint Server 2010、SharePoint Server 2013、SharePoint Server 2016 SharePoint Server 2019

指定五个区域中将与此新扩展的内部 URL 关联的区域。 此区域已不能使用。

类型必须是以下任何一个值:Default、Intranet、Internet、Extranet 或 Custom

参数属性

类型:SPUrlZone
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters