Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [active-directory]

Active Directory (AD) is a directory service created by Microsoft. It stores all information and settings for a deployment in a central database. AD allows administrators to assign policies, deploy and update software. AD networks can vary from a small installation with a few computers, users and printers to tens of thousands of users, many different network domains and large server farms spanning many geographical locations.

1
vote
1answer
50 views

Retrieving data from active directory with PHP

I have the following php function, that reads and returns data from the active directory. It is part of a project which will be graded (I'm in an apprenticeship). It is very long and I think the code ...
1
vote
0answers
29 views

Leavers Script to disable users in AD, Remove Groups, delete profile and move home folders

i am pretty new to powershell and im not great at coding, but i have managed to cobble together code from around the net to help save time when removing old students accounts in AD. Code currently ...
0
votes
1answer
26 views

Powershell Newcomer, Help to tidy up this code

I am pretty new to powershell and I'm not great at coding, but I have managed to cobble together code from around the net to help save time when removing old students accounts in AD. Code currently ...
2
votes
2answers
118 views

Powershell script that updates Active Directory user information

I wrote this Powershell script years ago for updating AD from a CSV file. I'd like to try to optimize to run quicker and be more efficient... but I'm not sure where to start / what could improve it. ...
0
votes
0answers
21 views

Get a users nested group memberships w/o AD cmdlets

So we have this customer that has a hybrid AD environment. They still have all their data on traditional network shares. But they are also moving all their users to AzureAD. Since the customer doesn'...
2
votes
0answers
2k views

Active Directory: Retrieve all group members using DirectoryServices

I have written a function that will retrieve all active directory group members via DirectoryServices. I am using ...
2
votes
0answers
2k views

Member management of Active Directory groups via an ASP.NET MVC website

Background One of the projects I'm working on is an Intranet website which is a front-end for several kinds of data, each aimed at a different set of users. Access to the website is handled through ...
2
votes
2answers
88 views

Pulling data from a CSV and populate AD

I've been piecing this together little by little for a little over a week. I'm curious if there's a cleaner way to accomplish what this is doing. Basically, it's pulling data from a CSV, creating ...
2
votes
0answers
36 views

Updating AD groups for students in each grade level

I have a bunch of groups that contain a nested group. Example: group "DElA 12th Grade" < currently contains group "Helena Class of 2018" group "DELA 11th Grade" < currently contains ...
2
votes
1answer
72 views

Get all AD groups and Exchange features of users

We have about 15000 users and 1000 groups in AD. I have been getting of all AD groups of all AD users and their Exchange features via script like below. But now I have been waiting for more than 3 ...
2
votes
1answer
241 views

VBs to query AD

I'm trying to get authentication with AD and to do this I've already made this code. Can anyone provide me if it's correct or not to do this or if I have a better solution. ...
2
votes
1answer
118 views

Inefficient PowerShell function for checking group membership

I use the following function in a PowerShell script to check and - depending on the value of the $Action - either add or remove an Active Directory User Object from ...
3
votes
1answer
1k views

Retrieving a thumbnail photo for an ActiveDirectory account

I have the following method and I would like to understand how it could be reorganized to be more unit-testable. I think the section about binding to Active Directory could go to its own method, ...
1
vote
2answers
102 views

Code Behind to manage AD users for a CRM system

I have big class in ASP.NET WebForms (legacy). I use VS 2012. I want to evaluate Conditions and execute Actions - Commands like: Create in AD Delete in AD Enable in CRM DesEnable in ...
7
votes
2answers
318 views

Get users from groups in active directory, disposing of everything

I am trying to get active directory groups with their users, all while disposing of all IDisposable assets when they reach the end of their usefulness. The groups ...
4
votes
1answer
3k views

Wrapper for ActiveDirectory UserPrincipal and DirectoryEntry

After much frustration and leaked memory from working with UserPrincipals and DirectoryEntrys, I have made a wrapper to get the ...
7
votes
1answer
84 views

Query - Instance of query run on ActiveDirectory

This class represents a single query on an Active Directory. It is given the type of query to run and the types of data to return, and performs the query and returns the data when it is commanded to ...
2
votes
1answer
390 views

Extension methods to get direct reports from user

I have created a few extension methods to get the direct reports of a UserPrincipal as UserPrincipals themselves. This saves the ...
5
votes
2answers
3k views

LDAP Login Script

This is my first time ever having code peer reviewed! This is just the main function I'm concerned about. Edit Apologies for the initial vagueness of my question, this is the "login" part of my ...
4
votes
1answer
88 views

Many similar ViewModel methods to fetch and prepare model data

I have a MVVM application that fetches data from active directory and displays it in a DataGrid. The exact data displayed is determined by which query a user runs, ...
4
votes
1answer
960 views

Active Directory Tool - Wpf application to query active directory and display results 2 (UI)

This is an update from here. I have made some changes, and have decided to only include the UI side of things in this particular question. I wanted to make the application follow the MVVM pattern, but ...
7
votes
1answer
2k views

Active Directory Tool - WPF application to query active directory and display results

This is a Windows Presentation Foundation application that queries active directory and can display lists of users, users by group, groups, and users by manager (direct reports). It operates on ...
1
vote
0answers
455 views

Active Directory Searcher class/API

This is intended to be a model for an application that queries an Active Directory. It can return IEnumerables of the following: ...
2
votes
3answers
115 views

Automating New User Creation With C# Web Service

I created a web service which can be called from a form to add new users to the system. The final service will add users to Active Directory and Exchange in the required format (please note that ...
2
votes
2answers
2k views

Adding some properties to an Active Directory user

I was writing the below section of code which adds some user properties to an Active Directory user, and got wondering - surely we can improve the readability of this : ...
7
votes
1answer
116 views

Building a string representing 50+ ActiveDirectory options

I have a switch statement used to handle options that a user selected (stored in an array). The array is iterated through, and for each element (enum object) in the array, an appropriate action is ...
3
votes
1answer
636 views

Active Directory Query Application - Take 2

This is an update to my previous post about my Active Directory Query Application. I have made multiple modifications, and I request some feedback. Summary: This program queries an active directory ...
3
votes
2answers
428 views

Active Directory Query Application

This application is designed to query an active directory, and at the moment, performs only two tasks: Save a list of all users to a file. Save a list of all groups that all users are in to a file. ...
2
votes
1answer
1k views

Create share folder, AD security group, add descriptions, and apply security to new folder

My goal for this script was to: Create new folder Create AD group FS-TESTSHARE-R Create AD group FS-TESTSHARE-RW Apply both groups to the new share folder Set full read permissions to FS-TESTSHARE-R ...
4
votes
1answer
358 views

Create share folder and AD security group and apply security to new folder

I think I'm finally done with my code and was hoping for some pointers. My goal for this script was to: Create new folder Create AD group FS-TESTSHARE-R Create AD group FS-TESTSHARE-RW Apply both ...
2
votes
2answers
951 views

A more efficient way of extracting a name from a string?

Here is some code that reads Active Directory to get a person's manager and parses the result for the managers name. It omits the remaining information. I was just wondering if there might be some ...
4
votes
1answer
3k views

Get AD Users' Latest Last Logon Dates across Multiple DCs

I was recently asked to help our Spanish BU to audit their AD for inactive accounts. Grabbing a script from online I gave them this: https://gallery.technet.microsoft.com/scriptcenter/Get-Active-...
5
votes
1answer
401 views

Find related groups among list of users

I have one of my first PowerShell scripts that will query a list of users in Active Directory. While doing so it will keep a tally in a hashtable that will update for every group increasing it count ...
5
votes
1answer
3k views

Query AD and build CSV based on certain user object properties

My question is about code efficiency. I recently had to write a Powershell 3.0 script which had the following criteria: It had to pull all enabled user objects from active directory It had to pull ...
4
votes
2answers
2k views

Loading Active Directory users by username and by SID

I have many different methods like ones below, but is there way I could improve them and remove duplicate code ? ...
5
votes
1answer
274 views

Terminating an Active Directory user

I'm writing an AD Termination script for work. I'm new to PowerShell and was wondering if multiple commands within PowerShell switch statement is okay to do: ...
6
votes
2answers
8k views

Authenticating user/password against Active Directory using ASP.NET Identity

I am trying to learn how to use ASP.NET Identity. My scenario is that I have to authenticate against Active Directory. For that purpose I am trying to use ...
1
vote
0answers
6k views

Active Directory + LDAP Queries

I've been trying to figure out the best way to query Active Directory with JavaScript. The code below is the best I can come up with. I was hoping someone could/would review my JavaScript code to see ...
6
votes
1answer
2k views

Active directory password changer

I have written this Active Directory password changer script. Comments and testing is appreciated for things I may have overlooked, since this is my first AD Script. There are two parts: PHP and ...
6
votes
2answers
3k views

Verifying that an Active Directory user is in a certain OU or group

I'm writing an application that needs to verify that an Active Directory user is in a certain OU or group. This allows me to tell if the user is a Field Agent or a Home Office User. However, I didn't ...
5
votes
1answer
2k views

PowerShell Active Directory Browser

I've just published ADExploder. It's a single-script PowerShell app (source) that uses classic Windows Forms and the Directory Services API to be able to browse nodes and properties of Active ...
4
votes
1answer
330 views

Active Directory details page

Recently I have been making an MVC application with a fluid, responsive design in mind. One of the views has been to implement a fast responsive active directory details page. This is the first time ...