Re: Netsh and IPSec Policies

From: David Beder [MSFT] (dbeder_at_online.microsoft.com)
Date: 10/22/04

  • Next message: MC: "Certificate Renewal minimum requirements"
    Date: Fri, 22 Oct 2004 00:00:41 -0700
    
    

    once your script returns from the first command, all context is lost, so for
    the second command the shell is going to assume you're trying to edit the
    local computer. What you need to do is create a file with ipsec commands,
    then call it from a single netsh command. Unfortunately I don't have a
    server at home so can't give you the specific syntax but the general idea
    would be:

    mypolicy.txt:
    ipsec
    static
    set store location=domain domain='FQDN of Domain'
    set policy name="Test Policy" activatedefaultrule=no gponame="Default Domain
    Policy" assign=yes

    mypolicy.cmd
    netsh -f mypolicy.txt

    -- 
    David
    Microsoft Windows Networking
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Nick" <someone@nospam.net> wrote in message 
    news:%23mPvQC4tEHA.1272@TK2MSFTNGP12.phx.gbl...
    >I hope someone can help me with this, I am trying to use 'netsh' on Windows 
    >2003 to script the creation of IPSec Policies and IPSec Filters. I have got 
    >this to work well for the Local Computer, but when I try and get it to 
    >create the Policy as part of the Domain Security Policy it does not 
    >work.... I have used the command:
    >
    > netsh ipsec static set store location=domain domain='FQDN of Domain'
    >
    > This command is accepted OK, but then when the follow command runs it 
    > fails:
    >
    > netsh ipsec static set policy name="Test Policy" activatedefaultrule=no 
    > gponame="Default Domain Policy" assign=yes
    >
    > It says that 'gponame' is not valid is this context. The thing is, it 
    > works if I enter it all manually from the netsh interface, but not from a 
    > Command file. I have checked TechNet and it says it should work OK in both 
    > instances.
    >
    > Any help appreciated.
    >
    > Thanks in advance.
    >
    > Nick
    >
    > 
    

  • Next message: MC: "Certificate Renewal minimum requirements"

    Relevant Pages

    • Netsh and IPSec Policies
      ... I hope someone can help me with this, I am trying to use 'netsh' on Windows ... 2003 to script the creation of IPSec Policies and IPSec Filters. ... create the Policy as part of the Domain Security Policy it does not work.... ... This command is accepted OK, but then when the follow command runs it fails: ...
      (microsoft.public.windows.server.security)
    • Re: *** Lost RUN from the start menue ***
      ... Restore the Run Command ... Run dialog box by pressing the Application key (the key with the Windows ... = The policy is disabled or not configured. ... This entry stores the setting of the Remove Run menu from Start Menu Group ...
      (microsoft.public.windowsxp.general)
    • Re: Run Command Line Missing
      ... The policy is not in affect or Win key + R would not work. ... all of these registry settings are under the ... Policy Settings for the Start Menu in Windows XP ... provided but the Run Command Line still doesn't appear. ...
      (microsoft.public.windowsxp.general)
    • Re: Run Command Line Missing
      ... The policy is not in affect or Win key + R would not work. ... all of these registry settings are under the ... Policy Settings for the Start Menu in Windows XP ... provided but the Run Command Line still doesn't appear. ...
      (microsoft.public.windowsxp.general)
    • Re: Netsh and IPSec Policies
      ... the shell, ... > for the second command the shell is going to assume you're trying to edit ... What you need to do is create a file with ipsec ... then call it from a single netsh command. ...
      (microsoft.public.windows.server.security)