1

I am trying to add a group of users into my trustedhost in WinRM configuration. It allowed me to add, but once I remove it, I am still able to access my server using my local computer.

I tried using this command

winrm set winrm/config/client '@{TrustedHosts="10.250.52.195/24"}'

I am not sure if this is working or not as I remove the trustedhosts I am still able to access my server using remote PowerShell. Wondering if anyone tried this before?

babo
  • 89
  • 1
  • 8
  • Where do you run your `winrm` command? On the server, or on the client? – user4003407 Jul 31 '19 at 07:29
  • `Get-Item WsMan:\localhost\Client\TrustedHosts` You could run that to see if the list of trusted hosts and see if it worked – techguy1029 Jul 31 '19 at 15:34
  • [How to add more than one machine to the trusted hosts list using winrm](https://stackoverflow.com/a/47524518/10350118) I would check out this answer, seems like the `psTrustedHosts` module could help out – techguy1029 Jul 31 '19 at 15:37
  • Тhe syntax for mutiple IPs if it's /24: winrm set winrm/config/client @{TrustedHosts="10.250.52.*"} – Mantvydas Feb 06 '22 at 02:34

0 Answers0