I have server (with Microsoft Windows Server 2003 R2 SE; manually installed WinRM) when I can enter remote session by simply typing:
Enter-PSSession *computername_here*
or (outside remote session) invoke remote command:
Get-Process -ComputerName *computername_here*
Unfortunately on another (with Microsoft Windows Server 2008 R2 SE) it doesn't work (although I use the same configuration). I need to enter (according to first example):
Enter-PSSession
IP address
-Credential "domain\username"
and after it give username and password. I'm aware that it's possible to save credentials to external file, but I wan't to do something to connect to remote server as simply as in case of first server? Should I check firewall or configure in special way my server?
==================================================================
Thank you for answer. I'm talking about "Microsoft Windows Server 2008 R2 Standard" OS
(as "*gwmi win32_operatingsystem |select name*" command told me).
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client
contain property TrustedHosts set to *, so I assume that it's correct.
It's interesintg that although I have administrator rights on both machines, I get an error message when I try to check what "localhost" contains not directly from the server, but from my local computer:
PS WSMan:\localhost> ls
Access is denied. + CategoryInfo : + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.GetChildItemCommand