Enable-WSManCredSSP

Enable-WSManCredSSP

Enables CredSSP authentication on a computer.

Syntax

Parameter Set: Default
Enable-WSManCredSSP [-Role] <String> [[-DelegateComputer] <String[]> ] [-Force] [ <CommonParameters>]




Detailed Description

The Enable-WSManCredSSP cmdlet enables Credential Security Support Provider (CredSSP) authentication on a client or on a server computer. When CredSSP authentication is used, the user credentials are passed to a remote computer to be authenticated. This type of authentication is designed for commands that create a remote session from another remote session. For example, if you want to run a background job on a remote computer, use this kind of authentication.

Use this cmdlet to enable CredSSP on the client by specifying Client in the Role parameter. This cmdlet performs the following actions:

-- Enables CredSSP on the client. This cmdlet sets the WS-Management setting <localhost|computername>\Client\Auth\CredSSP to true.
-- Sets the Windows CredSSP policy AllowFreshCredentials to WSMan/Delegate on the client.

These settings allow the client to delegate explicit credentials to a server when server authentication is achieved.

Use this cmdlet enable CredSSP on the server by specifying Server in Role. This cmdlet performs the following action:

-- Enables CredSSP on the server. This cmdlet sets the WS-Management setting <localhost|computername>\Service\Auth\CredSSP to true.

This policy setting allows the server to act as a delegate for clients.

Caution: CredSSP authentication delegates the user credentials from the local computer to a remote computer. This practice increases the security risk of the remote operation. If the remote computer is compromised, when credentials are passed to it, the credentials can be used to control the network session.

Parameters

-DelegateComputer<String[]>

Specifies servers to which client credentials are delegated. Specify fully qualified domain names.

If the Role parameter is Client, you must specify this paremter.

If Role is Server, do not specify this parameter.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Role<String>

Specifies whether to enable CredSSP as a client or as a server. The acceptable values for this parameter are: Client and Server.

If you specify Client, this cmdlet performs the following actions:

-- Enables CredSSP on the client. This cmdlet sets the WS-Management setting <localhost|computername>\Client\Auth\CredSSP to true.
-- Sets the Windows CredSSP policy AllowFreshCredentials to WSMan/Delegate on the client.

These settings allow the client to delegate explicit credentials to a server when server authentication is achieved.

If you specify Server, the cmdlet performs the following actions:

-- Enables CredSSP on the server. This cmdlet sets the WS-Management setting <localhost|computername>\Service\Auth\CredSSP to true.

This policy setting allows the server to act as a delegate for clients.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

    This cmdlet does not accept any input.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • System.Xml.XmlElement

    If CredSSP authentication is successfully enabled, this cmdlet generates an XMLElement object.


Notes

Examples

Example 1: Delegate client credentials

This command allows the client credentials to be delegated to the server02 computer.


PS C:\> Enable-WSManCredSSP -Role "Client" -DelegateComputer "server02.accounting.fabrikam.com"

Example 2: Delegate client credentials to all computers in a domain

This command allows the client credentials to be delegated to all the computers in the accounting.fabrikam.com domain.


PS C:\> Enable-WSManCredSSP -Role "Client" -DelegateComputer "*.accounting.fabrikam.com"

Example 3: Delegate client credentials to multiple computers

This command allows the client credentials to be delegated to multiple computers.


PS C:\> Enable-WSManCredSSP -Role "Client" -DelegateComputer "server02.accounting.fabrikam.com", "server03.accounting.fabrikam.com", "server04.accounting.fabrikam.com"

Example 4: Allow a computer to act as a delegate

This command allows a computer to act as a delegate for another. The Enable-WSManCredSSP cmdlet, shown in the earlier examples, only enables CredSSP authentication on the client, and specifies the remote computers that can act on its behalf. In order for the remote computer to act as a delegate for the client, the CredSSP item in the Service node of WSMan must be set to true. This example sets the CredSSP item in the Service node of WSMan to true.


PS C:\> Enable-WSManCredSSP -Role "Server"

Example 5: Allow a computer to act as a delegate by using Set-Item

This example allows a computer to act as a delegate for another computer. The Enable-WSManCredSSP commands, shown in the earlier examples, enable CredSSP authentication only on the client computer, and they specify the remote computers that can act on behalf of the client computer. For the remote computer to act as a delegate for the client computer, the CredSSP item in the Service directory of the WSMan provider must be set to true.

The first command creates a connection to the remote server02 computer by using the Connect-WSMan cmdlet.

The second command sets the credSSP value on the remote server02 computer by using the Set-Item cmdlet. This value allows the remote computer to act as a delegate.


PS C:\> Connect-WSMan -ComputerName "server02"
PS C:\> Set-Item -Path "wsman:\server02\service\auth\credSSP" -Value $True

Related topics

Community Additions

ADD
Show: