Hello,
The “Access Denied” you’re hitting is a classic double-hop authentication problem. When you run a remote PowerShell session from Server A, the credentials are valid only for that first hop. By default, they cannot be reused to access Server B’s file share. To solve this, you either enable CredSSP for delegation or configure Kerberos Constrained Delegation (KCD), depending on your security requirements.
CredSSP is the simpler option but less secure. You enable it on both the client and the target by running Enable-WSManCredSSP -Role Client -DelegateComputer ServerA on the initiating machine, and Enable-WSManCredSSP -Role Server on the remote host. Then you invoke your session with Enter-PSSession -ComputerName ServerA -Authentication CredSSP -Credential <domain\user>. This allows the credentials to be delegated to Server B. The downside is that CredSSP passes credentials in a way that increases exposure risk, so it should only be used in tightly controlled environments.
Kerberos Constrained Delegation is the recommended enterprise-grade solution. You configure this in Active Directory by editing the properties of the Server A computer account. In the Delegation tab, select “Trust this computer for delegation to specified services only” and choose “Use Kerberos only.” Then add the CIFS service for Server B (e.g., cifs/ServerB.domain.local). This allows Server A to delegate Kerberos tickets specifically for accessing Server B’s file shares. Once configured, remote PowerShell sessions from Server A can access Server B without failing on the second hop, and you avoid the security risks of CredSSP.
If you are running Windows Server 2016 or later, Microsoft explicitly recommends KCD over CredSSP for multi-hop scenarios, especially in production terminal server or RDS environments. CredSSP should be reserved for testing or isolated systems.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
Domic Vo.