Geeks With Blogs
derekf's blog On C#, repackaging applications, and deploying via group policy... April 2007 Entries
Converting a policy name to a GUID
Ok, part of all this we've already talked about requires that you have the policy's GUID. But how do you get it? Simple enough: private string Query(string Criteria, string Attribute) { DirectorySearcher mySearcher = new DirectorySearcher(new DirectoryEntry("LDAP://DC=D... null, null, AuthenticationTypes.Secure )); mySearcher.ClientTimeout = new TimeSpan(0, 0, 10); mySearcher.Filter = Criteria; mySearcher.SearchScope = SearchScope.Subtree; try { SearchResult result = mySearcher.FindOne(); ......

Posted On Monday, April 23, 2007 6:04 AM

Copyright © derekf | Powered by: