Unable to do PSSession into another remote desktop












0















I am trying to remote into another desktop using Powershell's Enter-PSSession to run a script automatically, however, i am not even able to connect to the remote desktop.



Enter-PSSession -Computername 172.16.164.14 -credential $cred


But it says access is denied. This is the error message:



Enter-PSSession : Connecting to remote server 172.16.164.14 failed with the 

following error message : Access is
denied. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -Computername 172.16.164.14 -credential $cred
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (172.16.164.14:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed


I also tried using:



Invoke-Command -ComputerName 7450-56Z0BP2 -FilePath -C:user_automationautomate.vbs -credential $cred


where 7450-56Z0BP2 is the hostname, but the error it gave me is:



    [7450-56Z0BP2] Connecting to remote server 7450-56Z0BP2 failed with the following error message : WinRM cannot process
the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: We can't sign
you in with this credential because your domain isn't available. Make sure your device is connected to your
organization's network and try again. If you previously signed in on this device with another credential, you can sign
in with that credential.
Possible causes are:
-The user name or password specified are invalid.
-Kerberos is used when no authentication method and no user name are specified.
-Kerberos accepts domain user names, but not local user names.
-The Service Principal Name (SPN) for the remote computer name and port does not exist.
-The client and remote computers are in different domains and there is no trust between the two domains.
After checking for the above issues, try the following:
-Check the Event Viewer for events related to authentication.
-Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or
use HTTPS transport.
Note that computers in the TrustedHosts list might not be authenticated.
-For more information about WinRM configuration, run the following command: winrm help config. For more
information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (7450-56Z0BP2:String) , PSRemotingTransportException
+ FullyQualifiedErrorId : AuthenticationFailed,PSSessionStateBroken


I am not sure what could be the cause of me not being able to access the remote computer. I am able to access it via Window 10's Remote Desktop Connection app, but i am not able to log in using the powershell script










share|improve this question























  • You must be using an account that is an admin on the remote host and PSRemoting must be properly enabled and configured.

    – postanote
    Jan 8 at 7:05
















0















I am trying to remote into another desktop using Powershell's Enter-PSSession to run a script automatically, however, i am not even able to connect to the remote desktop.



Enter-PSSession -Computername 172.16.164.14 -credential $cred


But it says access is denied. This is the error message:



Enter-PSSession : Connecting to remote server 172.16.164.14 failed with the 

following error message : Access is
denied. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -Computername 172.16.164.14 -credential $cred
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (172.16.164.14:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed


I also tried using:



Invoke-Command -ComputerName 7450-56Z0BP2 -FilePath -C:user_automationautomate.vbs -credential $cred


where 7450-56Z0BP2 is the hostname, but the error it gave me is:



    [7450-56Z0BP2] Connecting to remote server 7450-56Z0BP2 failed with the following error message : WinRM cannot process
the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: We can't sign
you in with this credential because your domain isn't available. Make sure your device is connected to your
organization's network and try again. If you previously signed in on this device with another credential, you can sign
in with that credential.
Possible causes are:
-The user name or password specified are invalid.
-Kerberos is used when no authentication method and no user name are specified.
-Kerberos accepts domain user names, but not local user names.
-The Service Principal Name (SPN) for the remote computer name and port does not exist.
-The client and remote computers are in different domains and there is no trust between the two domains.
After checking for the above issues, try the following:
-Check the Event Viewer for events related to authentication.
-Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or
use HTTPS transport.
Note that computers in the TrustedHosts list might not be authenticated.
-For more information about WinRM configuration, run the following command: winrm help config. For more
information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (7450-56Z0BP2:String) , PSRemotingTransportException
+ FullyQualifiedErrorId : AuthenticationFailed,PSSessionStateBroken


I am not sure what could be the cause of me not being able to access the remote computer. I am able to access it via Window 10's Remote Desktop Connection app, but i am not able to log in using the powershell script










share|improve this question























  • You must be using an account that is an admin on the remote host and PSRemoting must be properly enabled and configured.

    – postanote
    Jan 8 at 7:05














0












0








0








I am trying to remote into another desktop using Powershell's Enter-PSSession to run a script automatically, however, i am not even able to connect to the remote desktop.



Enter-PSSession -Computername 172.16.164.14 -credential $cred


But it says access is denied. This is the error message:



Enter-PSSession : Connecting to remote server 172.16.164.14 failed with the 

following error message : Access is
denied. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -Computername 172.16.164.14 -credential $cred
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (172.16.164.14:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed


I also tried using:



Invoke-Command -ComputerName 7450-56Z0BP2 -FilePath -C:user_automationautomate.vbs -credential $cred


where 7450-56Z0BP2 is the hostname, but the error it gave me is:



    [7450-56Z0BP2] Connecting to remote server 7450-56Z0BP2 failed with the following error message : WinRM cannot process
the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: We can't sign
you in with this credential because your domain isn't available. Make sure your device is connected to your
organization's network and try again. If you previously signed in on this device with another credential, you can sign
in with that credential.
Possible causes are:
-The user name or password specified are invalid.
-Kerberos is used when no authentication method and no user name are specified.
-Kerberos accepts domain user names, but not local user names.
-The Service Principal Name (SPN) for the remote computer name and port does not exist.
-The client and remote computers are in different domains and there is no trust between the two domains.
After checking for the above issues, try the following:
-Check the Event Viewer for events related to authentication.
-Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or
use HTTPS transport.
Note that computers in the TrustedHosts list might not be authenticated.
-For more information about WinRM configuration, run the following command: winrm help config. For more
information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (7450-56Z0BP2:String) , PSRemotingTransportException
+ FullyQualifiedErrorId : AuthenticationFailed,PSSessionStateBroken


I am not sure what could be the cause of me not being able to access the remote computer. I am able to access it via Window 10's Remote Desktop Connection app, but i am not able to log in using the powershell script










share|improve this question














I am trying to remote into another desktop using Powershell's Enter-PSSession to run a script automatically, however, i am not even able to connect to the remote desktop.



Enter-PSSession -Computername 172.16.164.14 -credential $cred


But it says access is denied. This is the error message:



Enter-PSSession : Connecting to remote server 172.16.164.14 failed with the 

following error message : Access is
denied. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -Computername 172.16.164.14 -credential $cred
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (172.16.164.14:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed


I also tried using:



Invoke-Command -ComputerName 7450-56Z0BP2 -FilePath -C:user_automationautomate.vbs -credential $cred


where 7450-56Z0BP2 is the hostname, but the error it gave me is:



    [7450-56Z0BP2] Connecting to remote server 7450-56Z0BP2 failed with the following error message : WinRM cannot process
the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: We can't sign
you in with this credential because your domain isn't available. Make sure your device is connected to your
organization's network and try again. If you previously signed in on this device with another credential, you can sign
in with that credential.
Possible causes are:
-The user name or password specified are invalid.
-Kerberos is used when no authentication method and no user name are specified.
-Kerberos accepts domain user names, but not local user names.
-The Service Principal Name (SPN) for the remote computer name and port does not exist.
-The client and remote computers are in different domains and there is no trust between the two domains.
After checking for the above issues, try the following:
-Check the Event Viewer for events related to authentication.
-Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or
use HTTPS transport.
Note that computers in the TrustedHosts list might not be authenticated.
-For more information about WinRM configuration, run the following command: winrm help config. For more
information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (7450-56Z0BP2:String) , PSRemotingTransportException
+ FullyQualifiedErrorId : AuthenticationFailed,PSSessionStateBroken


I am not sure what could be the cause of me not being able to access the remote computer. I am able to access it via Window 10's Remote Desktop Connection app, but i am not able to log in using the powershell script







remote-desktop powershell






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 8 at 4:35









LomlomLomlom

1




1













  • You must be using an account that is an admin on the remote host and PSRemoting must be properly enabled and configured.

    – postanote
    Jan 8 at 7:05



















  • You must be using an account that is an admin on the remote host and PSRemoting must be properly enabled and configured.

    – postanote
    Jan 8 at 7:05

















You must be using an account that is an admin on the remote host and PSRemoting must be properly enabled and configured.

– postanote
Jan 8 at 7:05





You must be using an account that is an admin on the remote host and PSRemoting must be properly enabled and configured.

– postanote
Jan 8 at 7:05










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1391753%2funable-to-do-pssession-into-another-remote-desktop%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1391753%2funable-to-do-pssession-into-another-remote-desktop%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido