Is it possible to use WinRM on Windows 2003?

This topic contains 19 replies, has 4 voices, and was last updated by Profile photo of Richard Siddaway Richard Siddaway 3 years, 9 months ago.

  • Author
    Posts
  • #10120
    Profile photo of GS
    GS
    Participant

    Hello,

    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?

  • #10123
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

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

  • #10125
    Profile photo of GS
    GS
    Participant

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

  • #10126
    Profile photo of David Christian
    David Christian
    Participant

    Hi GS,

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

    This link should get you started.

    http://support.microsoft.com/kb/968929

  • #10128
    Profile photo of GS
    GS
    Participant

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

  • #10130
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    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

  • #10131
    Profile photo of GS
    GS
    Participant

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

  • #10132
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

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

  • #10133
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    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.

  • #10135
    Profile photo of GS
    GS
    Participant

    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?

  • #10136
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    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
    http://support.microsoft.com/kb/968929

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

  • #10137
    Profile photo of GS
    GS
    Participant

    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.

  • #10138
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    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.

  • #10140
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Most of what you specified can be done without PSRemoting, as Richard mentioned (either through Get-WmiObject / Invoke-WmiMethod, Get-WinEvent -ComputerName , 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.

  • #10144
    Profile photo of GS
    GS
    Participant

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

  • #10145
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    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

  • #10147
    Profile photo of GS
    GS
    Participant

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

  • #10148
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

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

  • #10149
    Profile photo of GS
    GS
    Participant

    So which tools can utilize WinRM in this configuration remotely?

  • #10150
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    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

You must be logged in to reply to this topic.