PowerShell 7.3 - scenarios When Using New-PSSession with Kerberos Authentication on a Non-Domain Machine
I'm trying to figure out I've been banging my head against this for hours..... I'm trying to establish a remote session using PowerShell 7.3 on a non-domain machine to a Windows Server that requires Kerberos authentication. However, I keep working with the following behavior: ``` New-PSSession : Authentication failed because the user is not authorized. ``` I've verified that Kerberos is configured properly on the server, and I've also ensured that both client and server machines have the correct time settings, as time skew can cause authentication failures. To establish the session, I'm using the following command: ```powershell $session = New-PSSession -ComputerName 'Server1' -Authentication Kerberos -Credential (Get-Credential) ``` When I run this, I'm prompted for credentials, which I provide, but it still fails with the authentication behavior. I have tried using `-Authentication Negotiate` as well, but that resulted in a similar behavior. I've also ensured that the account I'm using has been granted permission to create remote sessions on the target server. After checking the `WSMan` configuration on the server with: ```powershell Get-WSManInstance -ResourceURI winrm/config -SelectorSet @{MachineName='Server1'} ``` The output confirms that remote access is enabled. I even verified the `SPN` (Service Principal Name) for the server, and it seems to be set correctly. I read about using `Enable-WSManCredSSP` for scenarios like this, but since I am on a non-domain machine, Iām unsure how that applies. Is there a specific configuration Iām missing, or any other steps I need to take to successfully establish a Kerberos-authenticated session from a non-domain machine? Any insights would be much appreciated! I'm working on a application that needs to handle this. I'm developing on Linux with Powershell. Is this even possible?