Example #1
0
        public void ShouldCreateLocalGroup()
        {
            var path = "WinNT://" + Environment.MachineName + ",computer";

            const string groupName = "Test";

            var imptCtxt = new WrapperImpersonationContext("MSHARONOV", "sdl.core", "P@ssw0rd");

            imptCtxt.Enter();

            var result = _target.CreateGroup(path, groupName).Sid;

            imptCtxt.Leave();

            result.Should().NotBeNullOrEmpty();
        }
        public AdGroupInfo Create(string groupName, string groupDescription = null)
        {
            var adPath = _activeDirectoryPathProvider.GetPath();

            return(_activeDirectoryClient.CreateGroup(adPath, groupName, groupDescription));
        }