DCSIMG
QuickTip - One-liners to get WinRM port numbers - Shay Levy

Shay Levy

If you repeat it, PowerShell it!

QuickTip - One-liners to get WinRM port numbers

With PowerShell 2.0 the default Windows Remote Management (WinRM) port numbers has changed from 80/443 (HTTP/HTTPS) to 5985/5986. One reason for changing the ports was a collision with internet servers which used the same ports. These ports are configured when you enable remoting in PowerShell 2.0, typically by using the Enable-PSRemoting cmdlet.

So, if you need a quick reminder about the port numbers WinRM uses for its listeners…


PS > Get-ChildItem WSMan:\localhost\Service\DefaultPorts | Format-Table -AutoSize Name,Value

Name  Value
----  -----
HTTP  5985
HTTPS 5986


PS > Get-ChildItem WSMan:\localhost\Client\DefaultPorts  | Format-Table -AutoSize Name,Value

Name  Value
----  -----
HTTP  5985
HTTPS 5986


Note: To run these commands in Windows Vista, Windows Server 2008, and later versions of Windows, you must start Windows PowerShell with the "Run as administrator" option.

Comments

Episode 99 – Shannon Ma on Configuration Management « PowerScripting Podcast said:

Pingback from  Episode 99 – Shannon Ma on Configuration Management «  PowerScripting Podcast

# February 1, 2010 7:15 AM

Episode 100 – Quest Mobileshell, PowerGui Pro and Your Tips « PowerScripting Podcast said:

Pingback from  Episode 100 – Quest Mobileshell, PowerGui Pro and Your Tips «  PowerScripting Podcast

# February 3, 2010 6:03 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: