We help IT Professionals succeed at work.

Powershell - Making a computer trusted for remoting

awgit
awgit used Ask the Experts™
on
I have ran winrm quickconfig to set the WimRM service. I verified the service is started.

I am running this command Set-Item TrustedHosts *  

I get the following error:

Set-Item : Provider execution stopped because the provider does not support this operation.
At line:1 char:9
+ set-item <<<<  Trustedhosts
    + CategoryInfo          : NotImplemented: (:) [Set-Item], PSNotSupportedException
    + FullyQualifiedErrorId : NotSupported,Microsoft.PowerShell.Commands.SetItemCommand

I tried Set-Item TrustedHosts pcname    with no luck

Any ideas?.... doing some searching it seems to have worked for others.

I am using Powershell 2.0 and trying on Windows 7 SP1 32bit

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Did you run PS elevated?
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
Sorry, you need to change the provider first:
   cd WSMan:\localhost\Client
   Set-Item TrustedHosts pcname -force
   restart-Service winRM

Open in new window


But that is required only if you want to use this machine to connect to pcname, and you cannot use Kerberos Authentication, e.g. because you are not in the same domain, or in a domain at all.

Author

Commented:
That worked!

Pro answer, thanks Qlemo