gpo

How do I configure group policies using C#?

旧时模样 提交于 2019-11-27 19:28:01
问题 How can I manipulate group policy based restriction for the controlpanel and the taskmanager in C#? 回答1: Have a look at WMI. Here is a link to an article on WMI Group policy objects: http://msdn.microsoft.com/en-us/library/aa375082(VS.85).aspx This tool will generate example c# code for you: WMICodeCreator 回答2: you can use Registry key to restriction task manager and control panel easily! 回答3: There is some information on how to edit GPO Registry settings available here: http://msdn.microsoft

Active Directory user password expiration date .NET/OU Group Policy

人盡茶涼 提交于 2019-11-27 04:51:37
I have searched the site for information and found this: ASP.NET C# Active Directory - See how long before a user's password expires which explains how to get the value of when the password expires as per Domain Policy. My question is this: what if the user has an OU Group Policy that has a different MaxPasswordAge value, overriding the one specified in Domain Group Policy? How to programatically get the OU's Group Policy Object? Edit: To make this question a little bit more clear, I am adding this edit. What I am after is to being able to tell when user's password expires. As far as I