Powershell remote access denied on workgroup

0

I've configured a domenstic network with PCs running windows 10 and I'm trying to set up remote access via powershell between these hosts. I've enabled remote access on all the hosts, authorizing all the hosts to control AND be controlled by all the hosts in the network, I've tested the connection between two PCs and it seems to be working cause the following returns no error:

 PS C:\WINDOWS\system32> test-WSman 192.168.1.132                        
 wsmid           : http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd    
 ProtocolVersion : http://schemas.dmtf.org/wbem/wsman/1/wsman.xs 
 ProductVendor   : Microsoft Corporation                        
 ProductVersion  : OS: 0.0.0 SP: 0.0 Stack: 3.0

but, when I try to establish a full session between the two hosts with the following command, I get error:

  PS C:\WINDOWS\system32>Enter-PSSession -ComputerName 192.168.1.132 -Credential User1                                                            
  Enter-PSSession : Connecting to remote server 192.168.1.132 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 192.168.1.132 -Credential User1                        
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo : InvalidArgument:(192.168.1.132:String) [Enter-PSSession], PSRemotingTransportException
  + FullyQualifiedErrorId : CreateRemoteRunspaceFailed 

After issuing this command, of course, pops-up the dialog box, asking for password. Maybe, the error could be in the credential I'm issuing...where do I get valid and acceptable credentials(user & password) in Windows, for connecting to a remote machine in my home network?

Do I need to create new ones, with get-credential cmdlet, or maybe credentials are tied to the local account on the machine I'm connecting from, or perhaps on the machine I'm connecting to? I'm totally inexpert in this field so I don't know how to solve it

P.S. I'm in a simply windows workgroup(with no home-group setted), not in a domain so the machines are in peer-to-peer configuration

WOPR

Posted 2018-04-27T18:11:55.203

Reputation: 1

Answers

0

There are a few PoSH remoting cmdlets that can be used without being administrator or even needing WinRM on the remote host:

Tip: Work Remotely with Windows PowerShell without using Remoting or

WinRM https://technet.microsoft.com/en-us/library/ff699046.aspx

But for much of PoSH remoting, you must be in the local administrators group on the remote host.

See also:

PowerShell Remoting without administrator rights

https://4sysops.com/archives/powershell-remoting-without-administrator-rights

PowerShell Remoting via WinRM for Non-Admin Users

http://woshub.com/powershell-remoting-via-winrm-for-non-admin-users

Configuring WinRM over HTTPS to enable PowerShell remoting

http://www.techdiction.com/2016/02/11/configuring-winrm-over-https-to-enable-powershell-remoting

postanote

Posted 2018-04-27T18:11:55.203

Reputation: 1 783

0

on the computer you are connecting from you will to run need this in admin powershell

Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" –Force

this makes your computer trust the one you are connecting to (* is all computers) then do

New-PSSession –computername 192.168.1.7 –credential nameofcomputer\administrator

you need the computername and the useraccount on that computer then put in password and it will work then

Enter-PSSession

Gdog

Posted 2018-04-27T18:11:55.203

Reputation: 1

But the problem is just about the fact that I don't know which credentials should be used(i.e. where to get these credentials). Definitely, I want to know where to get username and possibly a password of the machine I'm trying to connect to. I've tested the password tied to the email account used for accessing windows at the start-up but nothing seems to change – WOPR – 2018-08-21T14:24:15.357