Friday, June 26, 2009

How to configure winRM in Windows

Enable winrm
for Windows XP or Windows Server 2003 install this update
http://support.microsoft.com/default.aspx?scid=kb;EN-US;936059
then enter this command for a quick configuration
winrm quickconfig

or manualy

winrm create winrm/config/listener?Address=*+Transport=HTTP
netsh firewall add portopening TCP 80 "Windows Remote Management"

Change default port from 80 to 8181
Winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="8181"}

Create an https listener
winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname="";CertificateThumbprint=""}

Create an https listener and bind it to a specific ip address
winrm create winrm/config/Listener?Address=a.b.c.d+Transport=HTTPS @{Hostname="servername";CertificateThumbprint=""}

Enumerate configuration
winrm enumerate winrm/config/listener

Disable winrm
winrm delete winrm/config/listener?Address=*+Transport=HTTP

Change command prompt
if you want to identify the hostname of the remote server you are working with you can add an Extended String value in this registry key

HKLM\System\CurrentControlSet\Control\Session Manager\Environment

The value I use is [%Computername%]$s$p$g

See also these links for more tips
http://blogs.technet.com/jonjor/archive/2009/01/09/winrm-windows-remote-management-troubleshooting.aspx

http://blogs.dirteam.com/blogs/sanderberkouwer/archive/2008/02/23/remotely-managing-your-server-core-using-winrm-and-winrs.aspx

No comments:

Post a Comment