Windows Vista Forums

invoke-expression -computername ...
  1. #1



    Newbie
    Join Date : Apr 2008
    Posts : 5
    :P
    Local Time: 03:58 AM

    invoke-expression -computername ...

    Does the Windows Firewall service have to be running in order to use WS-Management? I really like this remoting capability, however, all of our servers have the service disabled. The only way I have been able to remote is with the service enabled. Any thoughts or should I give up on remoting for now?


      My System SpecsSystem Spec

  2. #2


    Marco Shaw [MVP] Guest

    Re: invoke-expression -computername ...

    bradn901cb wrote:

    > Does the Windows Firewall service have to be running in order to use
    > WS-Management? I really like this remoting capability, however, all of
    > our servers have the service disabled. The only way I have been able to
    > remote is with the service enabled. Any thoughts or should I give up on
    > remoting for now?
    >
    >
    You don't have to have the firewall running, but you'll have to do some
    steps manually (versus running the automatic setup script).

    I'll look them up, hopefully today, if nobody pipes up before me...

    --
    Microsoft MVP - Windows PowerShell
    http://www.microsoft.com/mvp

    PowerGadgets MVP
    http://www.powergadgets.com/mvp

    Blog:
    http://marcoshaw.blogspot.com

      My System SpecsSystem Spec

  3. #3



    Newbie
    Join Date : Apr 2008
    Posts : 5
    :P
    Local Time: 03:58 AM


      Thread Starter

    Re: invoke-expression -computername ...

    That would be great! No rush for this.

    Thanks

      My System SpecsSystem Spec

  4. #4


    Marco Shaw [MVP] Guest

    Re: invoke-expression -computername ...


    > You don't have to have the firewall running, but you'll have to do some
    > steps manually (versus running the automatic setup script).
    >
    > I'll look them up, hopefully today, if nobody pipes up before me...
    I don't have a test VM right now to go through this and double-check,
    but from the script, I gather the following needs to be done:

    1. Run this:
    PSH>$pshome/configure-wsman.ps1 -action CreateShell

    2. Run all of these from PowerShell:
    winrm set winrm/config/winrs `'@{MaxShellsPerUser=`"16`"}`'
    winrm set winrm/config/winrs `'@{MaxConcurrentUsers=`"5`"}`'
    winrm set winrm/config/winrs `'@{MaxMemoryPerShellMB=`"150`"}`'
    winrm set winrm/config `'@{MaxTimeoutms=`"180000`"}`'
    winrm set winrm/config `'@{MaxProviderRequests=`"400`"}`'
    winrm set winrm/config/Service `'@{MaxConnections=`"50`"}`'
    winrm create winrm/config/Listener?Address=*+Transport=HTTP"

    This will provide the same environment, except that the firewall
    exceptions aren't added.

    Marco

      My System SpecsSystem Spec

invoke-expression -computername ... problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ambersand & Invoke-Expression Jakob Bindslet PowerShell 1 05 May 2008
Invoke-Expression issue RG PowerShell 4 14 Jan 2008
Possible invoke-expression issue? Lanwin PowerShell 9 07 Jan 2008
Invoke-expression vs & Leo Tohill PowerShell 4 29 Nov 2007
Issue: Invoke-Expression with $args in the expression =?Utf-8?B?Um9tYW4gS3V6bWlu?= PowerShell 1 22 Sep 2006