Change Group Policy settings in VB.NET

B

Brian Mitchell

Does anyone know how to programmatically change the Group Policy settings
with .NET? (preferably VB) I found the IGroupPolicy object in the Platform
SDK but I don't code with C and I have no idea how to use header files in
..NET



Most of the settings I need can be changed in the registry which is no
problem, but some of the more secure ones (like audit and password policies)
can't be set there and I have don't know how to change them otherwise.



Thanks!!
 
M

Michael Nemtsev, MVP

Hello Brian,

See there some discussion about this http://www.developmentnow.com/g/21_...component-that-doesnt-implelemt-IDispatch.htm


---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


BM> Does anyone know how to programmatically change the Group Policy
BM> settings with .NET? (preferably VB) I found the IGroupPolicy object
BM> in the Platform SDK but I don't code with C and I have no idea how
BM> to use header files in .NET
BM>
BM> Most of the settings I need can be changed in the registry which is
BM> no problem, but some of the more secure ones (like audit and
BM> password policies) can't be set there and I have don't know how to
BM> change them otherwise.
BM>
BM> Thanks!!
BM>
 
D

Darren Mar-Elia

Yea, there is not a lot when it comes to accessing security policy (or other
policy for that matter). We developed the GPExpert Scripting Toolkit to
expose GP settings programmatically because of the lack of support in the
box for this. The Scripting Toolkit supports .Net access as well as
PowerShell if you have trouble getting what you need natively and want to
check it out. URL below...


--
Darren Mar-Elia
MS-MVP-Windows Server--Group Policy

Script Group Policy Settings with the GPExpert Scripting Toolkit for
PowerShell!
Find out more at http://www.sdmsoftware.com/products2.php

Visit the GPOGUY: http://www.gpoguy.com -- The Windows Group Policy
Information Hub:
FAQs, Training Videos, Whitepapers and Utilities for all things Group
Policy-related
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top