The setting of Windows Remote Management (WinRM) is quite confusing. After some hard work, I finally set this function successfully. The following is the configuration process, I hope it helps.

Server side

start winrm service

On Powershell (as admin):

net start winrm

Or, on CMD (as admin):

winrm quickconfig

Note: If the user account is not the original "administrator" account, run the following in the CMD ( as admin ).

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f

Check the winrm status in powershell:

Get-Service | findstr "WinRM"

start listener

Start remote management in powershell:

Enable-PSRemoting -Force

Use the following command to check winrm listening status in CMD:

winrm enumerate winrm/config/listener

Client side

start winrm service

Start winrm service (Powershell)

net start winrm

Check the service status (Powershell)

Get-Service | findstr "WinRM"

start remote management (Not Necessary, can skip)

Start remote management (Powershell)

Enable-PSRemoting -Force

add server to trust list (Necessary)

Set the server IP to trustlist:

Set-Item WSMan:\localhost\Client\TrustedHosts -Value ""

Get-Item WSMan:\localhost\Client\TrustedHosts

connect to server (specify computer name if receiving error)

Connect to the server

Enter-PSSession x.x.x.x -Credential $X


Enter-PSSession x.x.x.x -Credential yourcomputername\yourusername

Note: computer name is important, you may receive connection error if computer name unspecified.


Categories: Computer


Leave a Reply

Your email address will not be published.