Announcement

Collapse
No announcement yet.

Use group policy in managed code

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use group policy in managed code

    Hi,

    I am using Windows server 2k8 R2 and have known how to disable shutdown event tracker UI manually by configuring group policy.

    Is there a way to operate group policy using managed code so that I can disable shut down event tracker UI programmatically?

    Appreciate any hints.


    Thanks
    Leon

  • #2
    Re: Use group policy in managed code

    Group Policy is based on a domain and applied automatically
    If you are not in a domain environment, local policies will do similar things.

    Both local and group policies modify the registry so if you can work out which keys are modified, you could write code to do it.

    Are you in a domain or is this a stand-alone server?
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Use group policy in managed code

      Thanks for reply.

      I am currently using a standalone server so as you said I can use local policy.

      I plan to use powershell to manipulate local policy for now (group policy in the future) and have known that I need to import grouppolicy module in powershell first to manipulate group policy in powershell.

      Do you know how I can manipulate local policy in powershell? Should I import some module first similar to group policy?

      After I can do this in powershell, I can wrap the PS scripts in C#.

      Thanks for your guide.

      Leon

      Comment


      • #4
        Re: Use group policy in managed code

        No warranty at all on this (and I see it is Group not Local Policy) but it might be a starting point
        http://group-policy-scripting-for-po....qarchive.org/
        Also
        http://technet.microsoft.com/en-us/l...56(WS.10).aspx
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment

        Working...
        X