Windows Vista Forums

Changing WinRM service/server port

  1. #1


    Marco Shaw [MVP] Guest

    Changing WinRM service/server port

    Anyone know how to change the server/service port?

    I've created a listener, but I think I need to change the WinRM client
    and server to use the new port...

    PS C:\> Set-WSManInstance -ResourceURI
    winrm/config/service/DefaultPorts -Value @{HTTP="6000"}
    Set-WSManInstance : The WinRM client cannot process the request
    because it is trying to update a read-only setting. Rem
    ove this setting from the command and try again.
    At line:1 char:18
    + Set-WSManInstance <<<< -ResourceURI
    winrm/config/service/DefaultPorts -Value @{HTTP="6000"}
    + CategoryInfo : InvalidOperation: (
    [Set-WSManInstance], InvalidOperationException
    + FullyQualifiedErrorId :
    WsManError,Microsoft.WSMan.Management.SetWSManInstanceCommand

      My System SpecsSystem Spec

  2. #2


    Bob Landau Guest

    RE: Changing WinRM service/server port

    Marco,

    The settings you are trying to change are global which is another way of
    saying assuming you can change these any scripts you give us using powershell
    remoting would break and visa versa.

    How are you making the remote call?

    Either

    Invoke-Command -Computer X -Port 6000 ...

    or

    Invoke-Command -ConnectionURI http://X:6000 ...

    should work. I've yet to try this out but this is on my short list but I
    don't want to experiement on my main machine so need to create a VM for
    testing.


    "Marco Shaw [MVP]" wrote:

    > Anyone know how to change the server/service port?
    >
    > I've created a listener, but I think I need to change the WinRM client
    > and server to use the new port...
    >
    > PS C:\> Set-WSManInstance -ResourceURI
    > winrm/config/service/DefaultPorts -Value @{HTTP="6000"}
    > Set-WSManInstance : The WinRM client cannot process the request
    > because it is trying to update a read-only setting. Rem
    > ove this setting from the command and try again.
    > At line:1 char:18
    > + Set-WSManInstance <<<< -ResourceURI
    > winrm/config/service/DefaultPorts -Value @{HTTP="6000"}
    > + CategoryInfo : InvalidOperation: (
    > [Set-WSManInstance], InvalidOperationException
    > + FullyQualifiedErrorId :
    > WsManError,Microsoft.WSMan.Management.SetWSManInstanceCommand
    > .
    >

      My System SpecsSystem Spec

  3. #3


    Bob Landau Guest

    RE: Changing WinRM service/server port

    don't forget about the firewall

    http://support.microsoft.com/default.aspx/kb/947709

    "Bob Landau" wrote:

    > Marco,
    >
    > The settings you are trying to change are global which is another way of
    > saying assuming you can change these any scripts you give us using powershell
    > remoting would break and visa versa.
    >
    > How are you making the remote call?
    >
    > Either
    >
    > Invoke-Command -Computer X -Port 6000 ...
    >
    > or
    >
    > Invoke-Command -ConnectionURI http://X:6000 ...
    >
    > should work. I've yet to try this out but this is on my short list but I
    > don't want to experiement on my main machine so need to create a VM for
    > testing.
    >
    >
    > "Marco Shaw [MVP]" wrote:
    >

    > > Anyone know how to change the server/service port?
    > >
    > > I've created a listener, but I think I need to change the WinRM client
    > > and server to use the new port...
    > >
    > > PS C:\> Set-WSManInstance -ResourceURI
    > > winrm/config/service/DefaultPorts -Value @{HTTP="6000"}
    > > Set-WSManInstance : The WinRM client cannot process the request
    > > because it is trying to update a read-only setting. Rem
    > > ove this setting from the command and try again.
    > > At line:1 char:18
    > > + Set-WSManInstance <<<< -ResourceURI
    > > winrm/config/service/DefaultPorts -Value @{HTTP="6000"}
    > > + CategoryInfo : InvalidOperation: (
    > > [Set-WSManInstance], InvalidOperationException
    > > + FullyQualifiedErrorId :
    > > WsManError,Microsoft.WSMan.Management.SetWSManInstanceCommand
    > > .
    > >

      My System SpecsSystem Spec

  4. #4


    Marco Shaw [MVP] Guest

    Re: Changing WinRM service/server port

    New-PsSession supports a Port parameter, which likely allows one to override
    the default WinRM settings *or*, you can edit the WinRM client itself to use
    a different port to match the server-side...

    Marco

    "Bob Landau" <BobLandau@newsgroup> wrote in message
    news:E1168E8A-3C61-4E87-A848-0688DD90C27A@newsgroup

    > Marco,
    >
    > The settings you are trying to change are global which is another way of
    > saying assuming you can change these any scripts you give us using
    > powershell
    > remoting would break and visa versa.
    >
    > How are you making the remote call?

      My System SpecsSystem Spec


Changing WinRM service/server port
Similar Threads
Thread Forum
Changing port 443 to some other SBS Server
net.tcp port sharing service - any disadvantages? .NET General
Changing default http port (80)? Network & Sharing
winrm connection to custom web service PowerShell
Changing Port Number Vista mail