Need a script to enable/disable GPO Links

Discussion in 'Scripting' started by LibraryDude, Jul 13, 2004.

  1. LibraryDude

    LibraryDude Guest

    I am trying to set up a scheduled task that will disable
    one GPO Link & enable a different GPO Link within the
    same OU. I understand that I need to use a script and
    have looked at the samples included with GPMC, but this
    stuff is over my head. I have found "IGPMGPOLink" in the
    GPMC Interfaces section of GPMC help (Manages a GPO link
    from a SOM. Sets and retrieves properties of GPO links,
    such as the link order or whether a link is enabled or
    enforced.). This appears to do exactly what I want it to
    do, but have no idea how to use it.

    Here is my OU layout:

    <Domain Root>
    <OU1>
    <OU2>
    <OU3>
    <OU4>
    <OU5>
    <OU6>
    <OU6a>
    <OU6b>
    <OU6c>
    GPOLink GPOName=TestPolicy1
    GPOLink GPOName=TestPolicy2
    <OU7>
    <OU8>
    <OU9>
    <OU9a>
    <OU9b>
    <OU10>


    I need to disable the TestPolicy1 link & enable the
    TestPolicy2 link in OU6c.

    Can anybody help me with this?

    Thanks,
    LibraryDude
     
    LibraryDude, Jul 13, 2004
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.