Is it possible to use WinRM on Windows 2003?


I see WinRM is installed as service on Windows 2003 and service is set to running. I executed “winrm quickconfig” on servers and tried to connect to it from my host which runs PS3.0 but it fails. I can see request being made to /wsman to server and it fails with HTTP 404. Is it supposed to work somehow and I’m missing some steps?

What version of PowerShell do you have on the remote server?
Did you enable removing on the remote server?

Powershell is not installed on remote box, only WinRM service is up and running.

Hi GS,

This is possible but you’ll need to install version 2 of PowerShell.

This link should get you started.

Without powershell installed it would be impossible to use WinRM service which is already installed on server somehow to utilize it?

what exactly are you trying to achieve thru the winrm connectivity. If you want to run remote powershell you will need poweshell installed. You can’t use the powershell 3 cim cmdlets as they require wsman 3 which isn’t available for win 2003. you might be able to run the wsman cmdlets against the remote box but I haven’t tried that config have doubts it would work.
you need ps 2on that remote machine

I thought I would get remote console access (like telnet), I assume this is not correct based on your statement

PowerShell uses WinRM to provide that sort of functionality (via the Enter-PSSession cmdlet), but WinRM alone doesn’t work that way.

PowerShell has a number of options for using winrm:

  • enter a session on the remote computer. Telnet like but need PowerShell at the remote end
  • send one or commands to the remote machine - again need Powershell installed on the remote machine
  • perform some functions direct to WMI using the WSMAN set of cmdlets
  • perform some function via WMI using the PowersShell v3 CIM cmdlets
  • perform some configuration of winrm/wsman on the remote machine

In all cases winrm is the transport mechanism between the remote machines. Winrm is Microsoft’s implementation of the WSMAN protocol. It doesn’t bring any admin functionality to the table by itself. You need PowerShell or another tool to work with it.

What options do you have when WinRM is installed on remote machine but nothing else (like Windows 2003 in my case)? What tools you can use remotely on such a box where box itself do not have anything except WinRM running. If Powershell can utilize WMI via WSMAN set of CmdLets, would not that be possible to use?

You might be able to use the WSMAN cmdlets but I haven’t actually tried it and give it a low probability.

I think a more relevant question is what are you trying to do against the remote box and is winrm the correct tool?

is there a reason you can’t get PowerShell 2.0 installed on the remote machine? It is available for Windows 2003

and you will be able to communicate to it from your PowerShell 3.0 machine

I’m in corporate environment and changes to box (like installing powershell which will require .NET framework install is very bureacracy heavy and manually intensive). So I’m trying to figure out if I can do any remote administration/automation of the box without RDPing into it.
For example can I launch executable remotely, can I get available drive space informaiton, latest event log entries etc. I know I can do it over WMI but I want to do this interactively remotely via powershell.

In this case I think your best option is to use the remote options of individual cmdlets. Anything that has a -Computername parameter should be able to contact the remote box (the CIM cmdlets are a special case in that you will need to create a CIM session using DCOM so you are probably better off using the WMI cmdlets for simplicity).
You can find the cmdlets like this
get-help * -Parameter ComputerName

With these limitations I don’t think you have another option. You are effectively working interactively against the remote machine.

Most of what you specified can be done without PSRemoting, as Richard mentioned (either through Get-WmiObject / Invoke-WmiMethod, Get-WinEvent -ComputerName <blah>, etc). To launch executables remotely without installing PowerShell on the target system, your best bet is probably to use psexec (available here.) You won’t get back objects the way you would if you were using PowerShell Remoting, but you can at least get the job done.

All those calls will use RPC is not it and not WinRM?

They will use DCOM/RPC. If you can’t get PowerShell installed on the box to do PowerShell remoting you don’t have much else to fall back on

I assumed that I can use WinRM (port 80) for some functionality

Not unless you write some apps to do that. Simpler to get PowerShell installed.

So which tools can utilize WinRM in this configuration remotely?

Sorry don’t know. Never tried as I’ve always ensured that PowerShell was available to me remotely or I went down the WMI route