Results 1 to 2 of 2

Thread: automate enabling/disabling of policy settings

  1. #1
    cward1768 is offline Getting Started on GPanswers.com
    Join Date
    Dec 1969
    Posts
    1

    Default

    I have a login banner configured through a policy that we'd like to have enabled for one week, every 90 days, instead of having the banner come up on every computer logon.

    Is there a way to schedule the enabling and disabling of the settings for the banner text and banner title? I know I can go in the week I want it to run, enable it, then week later, disable it, but I would like to automate it if possible.

    Thanks in advance for any help.

  2. #2
    Tom Decaluwe is offline 10+ Helpful Posts 15+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    18

    Default

    this is certainly possible using vb scripts. The easiets thing to do would be to create a vbscript that disables the GPO object and a second one to enable the gpo object and then just set them to run using a windows schedual.

    seeing you just want to disable the warning message you could have enough with just disabeling the correct part of the GPO but this script will do both computer / user portion.

    Sample code for disable:

    -------- cut --------------


    Const GUID = "<your gpo's guid>"
    Const DOMAIN = "mydomain.mycorp.com"

    Dim gpm, gpmDomain, gpmGPO

    Set gpm = CreateObject("GPMGMT.GPM")
    Set gpmDomain = gpm.GetDomain (DOMAIN, "", 0)
    Set gpmGPO = gpmDomain.GetGPO (GUID)
    If gpmGPO.IsUserEnabled Then
    gpmGPO.SetUserEnabled FALSE
    End If
    If gpmGPO.IsComputerEnabled Then
    gpmGPO.SetComputerEnabled FALSE
    End If

    ------- past -------------------

    for more info http://www.windowsitpro.com/Articles...rticleID=39856

    have fun,

    Tom Decaluwé

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO