Created
December 31, 2016 03:02
-
-
Save codewithtyler/ca3e7dac251c28f420cd247649c5041c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private string _distinguishedName = "OU=test,DC=cwn,DC=org"; | |
| DirectoryManagement manager = new DirectoryManager( _distinguishedName ); | |
| List<Container> containers = manager.Children; | |
| List<Group> groups = containers.Children; | |
| // Add a new container | |
| Container _container = new Container(); | |
| manager.Add( _container ); | |
| // Add a new group to a specific container | |
| Group _group = new Group(); | |
| Container _testContainer = containers.Children.Find( "test" ); | |
| _testContainer.Add( _group ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment