Export (0) Print
Expand All
Expand Minimize

New-SPAuthenticationProvider

SharePoint 2013
 

Applies to: SharePoint Server 2013 Enterprise, SharePoint Foundation 2013

Topic Last Modified: 2013-12-18

Creates a new authentication provider in the farm.

New-SPAuthenticationProvider [-AllowAnonymous <SwitchParameter>] [-AssignmentCollection <SPAssignmentCollection>] [-DisableKerberos <SwitchParameter>] [-UseBasicAuthentication <SwitchParameter>] [-UseWindowsIntegratedAuthentication <SwitchParameter>]
New-SPAuthenticationProvider -ASPNETMembershipProvider <String> -ASPNETRoleProviderName <String> [-AssignmentCollection <SPAssignmentCollection>]
New-SPAuthenticationProvider -TrustedIdentityTokenIssuer <SPTrustedIdentityTokenIssuerPipeBind> [-AssignmentCollection <SPAssignmentCollection>]

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 New-SPAuthenticationProvider cmdlet creates a new authentication provider in the farm.

--NTLM, Classic NTLM, Negotiate, and Classic Negotiate can be set only in a web application.

--For ASP.NET Membership Provider or Role providers, no objects are persisted. The object is created and used for setting this type of Authentication provider in a web application.

--For STS Authentication providers, an object is created and persisted in the SPFarm object.

You cannot use classic NTLM with any claims-based authentication type.

 

Parameter Required Type Description

ASPNETMembershipProvider

Required

System.String

Specifies the name of the membership provider.

The value must be a valid name of an ASP.NET membership provider; for example, myMembershipProvider.

ASPNETRoleProviderName

Required

System.String

Specifies the name of the role provider.

The value must be a valid name of an ASP.NET role provider; for example, myRoleProvider.

TrustedIdentityTokenIssuer

Required

Microsoft.SharePoint.PowerShell.SPTrustedIdentityTokenIssuerPipeBind

Specifies the identity of the authentication provider.

The value must be in one of the following forms:

--A valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh

--A valid name of a TrustedIdentityTokenIssuer (for example, myRoleProvider)

--An instance of a valid SPTrustedIdentityTokenIssuer object

AllowAnonymous

Optional

System.Management.Automation.SwitchParameter

Specifies whether the web application allows anonymous access.

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.

NoteNote:
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.

DisableKerberos

Optional

System.Management.Automation.SwitchParameter

Specifies whether the web application disables Kerberos authentication.

UseBasicAuthentication

Optional

System.Management.Automation.SwitchParameter

Specifies whether the web application uses Basic authentication.

UseWindowsIntegratedAuthentication

Optional

System.Management.Automation.SwitchParameter

Specifies whether the web application uses Integrated Windows authentication.

---------------------------EXAMPLE1------------------

$ap = New - SPAuthenticationProvider -UseWindowsIntegratedAuthentication
Set-SPWebApplication -Name "Claims Windows Web App" -ApplicationPool "Claims App Pool" -ApplicationPoolAccount "redmond\appool" -Url http://<servername> -Port 80 -AuthenticationProvider $ap

This example creates a Windows claims authentication provider.

---------------------------EXAMPLE2------------------

$ap = New-SPAuthenticationProvider -ASPNETMembershipProvider "membership" -ASPNETRoleProviderName "rolemanager"
Set-SPWebApplication -Name "Claims Windows Web App" -ApplicationPool "Claims App Pool" -ApplicationPoolAccount "redmond\appool" -Url http://<servername> -Port 80 -AuthenticationProvider $ap

This example creates an authentication provider that is based on the ASP.NET membership role provider.

---------------------------EXAMPLE3------------------

$ap = New - SPAuthenticationProvider -TrustedIdentityTokenIssuer | Get-SPTrustedIdentityTokenIssuer "LiveIDSTS"
Set-SPWebApplication -Name "Claims Windows Web App" -ApplicationPool "Claims App Pool" -ApplicationPoolAccount "redmond\appool" -Url http://<servername> -Port 80 -AuthenticationProvider $ap

This example creates a trusted token issuer authentication provider.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft