Windows PowerShell Remoting (WinRM) allows system administrators to manage remote servers and workstations across enterprise networks. However, administrators frequently encounter the notorious double-hop problem: when executing a remote session from Machine A into Server B, and subsequently attempting to access a network share, file server, or domain controller on Server C, authentication fails with an Access is Denied error.
This failure occurs because standard Kerberos and NTLM credentials cannot be delegated beyond the initial hop by default. The Credential Security Support Provider (CredSSP) protocol resolves this limitation. CredSSP securely forwards an authenticated user’s credentials from the client machine to the target server, allowing the remote server to impersonate the administrator and perform second-hop network operations seamlessly.
Security Considerations and Encryption Governance
Because CredSSP delegates plaintext credential hashes to the target server, it should only be configured between fully trusted workstations and servers. Furthermore, modern Windows 11 and Windows Server environments require CredSSP Oracle Remediation policies to protect against remote code execution vulnerabilities (CVE-2018-0886).
Step 1: Enabling CredSSP on the Client Workstation
To delegate credentials, the originating client machine must enable the CredSSP client role and declare the authorised target servers.
- Right-click the Start button on Windows 11 and select Terminal (Admin) or PowerShell (Admin).
- Run the
Enable-WSManCredSSPcmdlet with the-Role Clientparameter:Enable-WSManCredSSP -Role Client -DelegateComputer "*.corp.contoso.com"Note: You can replace the wildcard with specific Fully Qualified Domain Names (e.g.
server01.corp.contoso.com) for maximum least-privilege security. - When prompted to confirm the configuration changes, press Y and press Enter.
Step 2: Enabling CredSSP on the Remote Target Server
The target server (Server B) must be configured to accept delegated credentials.
- Open an elevated PowerShell prompt on the target server.
- Enable the server role:
Enable-WSManCredSSP -Role Server -Force - Confirm that the WinRM service is configured to accept CredSSP authentication:
Get-WSManInstance -ResourceURI winrm/config/service/authEnsure the
CredSSPattribute is listed astrue.
Step 3: Configuring CredSSP via Group Policy (Domain Environments)
In Active Directory domains, configuring CredSSP centrally via Group Policy ensures consistent configuration and compliance across administrative tiers:
- Open Group Policy Management (
gpmc.msc) on your domain management station. - Create or edit a Group Policy Object (GPO) linked to your administrator workstations.
- Navigate to the following policy container:
Computer Configuration > Administrative Templates > System > Credentials Delegation - Configure the following policies:
- Allow delegating fresh credentials: Set to Enabled. Click Show… and add server Service Principal Names (SPNs), such as
wsman/*.corp.contoso.com. - Encryption Oracle Remediation: Set to Enabled and verify the protection level is set to Force Updated Clients.
- Allow delegating fresh credentials: Set to Enabled. Click Show… and add server Service Principal Names (SPNs), such as
- Run
gpupdate /forceon the target systems to apply the policy.
Step 4: Executing Multi-Hop Commands with CredSSP
Once CredSSP is enabled on both endpoints, you can initiate remote sessions that forward your credentials:
Initiating an Interactive Remoting Session
Enter-PSSession -ComputerName "server01.corp.contoso.com" -Authentication CredSSP -Credential (Get-Credential)
Inside the interactive session on server01, test accessing a remote network share on a third machine:
# Test second-hop network access
Get-ChildItem -Path "\\fileserver.corp.contoso.com\Deployments"
The directory contents will populate cleanly without access denied errors.
Running One-Off Multi-Hop Commands via Invoke-Command
Invoke-Command -ComputerName "server01.corp.contoso.com" -Authentication CredSSP -Credential (Get-Credential) -ScriptBlock {
Copy-Item -Path "\\fileserver.corp.contoso.com\Installers\app.msi" -Destination "C:\Installers\" -Verbose
}
Auditing and Disabling CredSSP After Use
To maintain a hardened posture, verify active CredSSP settings using the WSMan provider:
# Check client delegation status
Get-WSManInstance -ResourceURI winrm/config/client/auth
# Disable CredSSP when administrative tasks are complete
Disable-WSManCredSSP -Role Client
Disable-WSManCredSSP -Role Server
Configuring CredSSP unlocks multi-tier PowerShell automation across enterprise networks while eliminating the administrative overhead of storing static passwords in remote scripts.