Skip to content

gelndjj/_WORK_Active_Directory_Automate

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Active Directory Automate (Windows Server Machine)

A Python application to handle Active Directory tasks
Explore the docs »

· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Usage
  3. Contributing
  4. License
  5. Contact

About The Project

Logo
Active Directory Automate is a sophisticated application designed to streamline the process of user management within Active Directory (AD). Born out of the necessity to eliminate the repetitive and manual task of creating AD users, this tool stands as a testament to the power of automation in the IT administration field.

Screenshot

At the heart of Active Directory Automate is its ability to create and manage SQL databases that serve as the repository for user information. With functionality that enables you to add, edit, and modify user details, the application seamlessly synchronizes this data with Active Directory, ensuring a synchronized and up-to-date user management system.

The principal aim of this project is to significantly reduce the administrative overhead associated with managing thousands of users in Active Directory

Screenshot

(back to top)

Usage

  1. Launching the Application:
  • Critical Note: The executable (EXE) file must be launched directly on the Windows Server machine where Active Directory services are hosted. This is essential for the tool to function correctly and securely interact with Active Directory.
  • Do not attempt to run the executable from client machines. Doing so may result in improper functionality and security risks.
  1. Performing Tasks:
  • After launching the application on the server, follow the on-screen instructions to perform various Active Directory management tasks.
  • Security and Compliance: Ensure that you have the necessary permissions and comply with your organization's IT policies when using this tool on the server.

Usage Documentation

Table of Contents

Record Management

Add Record

  • Description: Creates a new user record in the application with the details provided in the input fields.
  • Usage: Complete the input fields under 'Record' and click this button to save a new record.

Update Record

  • Description: Modifies an existing user record.
  • Usage: After editing details in the 'Record' section, click this button to apply the updates.

Clear Entry Boxes

  • Description: Clears all the input fields in the 'Record' section.
  • Usage: Click this to reset the form and prepare for new input.

Reassign IDs

  • Description: Automatically reassigns IDs to all records in the database to maintain a sequential order.
  • Usage: Use this button to reorganize the ID sequence after record deletions.

Delete Duplicates

  • Description: Scans the database for duplicate records and removes them.
  • Usage: Click this button to clean up the database by removing duplicates.

Remove Record

  • Description: Deletes the selected user record from the database.
  • Usage: Select a record and use this button to permanently delete it from the database.

Remove All Records

  • Description: Deletes all records from the database.
  • Usage: Use this with caution; it will completely empty the database of user records.

PowerShell Commands

Sync Database to AD

  • Description: Synchronizes the current database entries with Active Directory. The selected databsse in the DataBase Storing section will be synchronized.
  • Usage: Click this to update Active Directory with the information from the application database.

Edit Sync DB Script

  • Description: Opens the script used for database synchronization for editing.
  • Usage: Click this if you need to modify the PowerShell script parameters or behavior.

Change User Password

  • Description: Initiates a prompt to change the password for a single or multiple selected users from the database then synchronize the changes to Active Directory.
  • Usage: Select one or many user(s) and click this to begin the password change process.

Enable/Disable User(s)

  • Description: Makes the account of the selected user(s) Enable if Disable and Disable if Enable.
  • Usage: Select one or many user(s) and click this to begin the enable/disable account process.

Python Commands

Add One Fake Record

  • Description: Inserts a placeholder record with generated information into the database.
  • Usage: Click this to add a single dummy record for testing or demonstration purposes.

Add Multiple Fake Records

  • Description: Generates and adds multiple placeholder records to the database.
  • Usage: Click this to insert a batch of dummy records.

Export Database to CSV

  • Description: Exports the entire database to a CSV file named 'database_name'-YYYYMMDD-HH-MM-SS.
  • Usage: Use this button to create a CSV backup or for data analysis purposes.

Import Record from CSV

  • Description: Imports records into the database from a CSV file.
  • Usage: Click this and select a CSV file to upload and add records from it to the database.

Database Storing

Create New Database

  • Description: Initializes a new, empty database for storing user records.
  • Usage: Click this to set up a fresh database, typically used when starting from scratch.
  • IMPORTANT: Place the database at the root of the application.

Browse Database

  • Description: Opens a file dialog to explore and manage the database files.
  • Usage: Use this to locate and open an existing database file.
  • Detail: Copies the selected database at the root of the application.

Backup Current Database

  • Description: Creates a backup copy of the current database and name it 'database_name'-YYYYMMDD-HH-MM-SS.
  • Usage: Click this to ensure you have a recent backup of your user data.

Organisation Unit Management

Select Organisation Unit

  • Description: Allows the selection of an organizational unit from Active Directory to manage.
  • Usage: Click to display and select from available organizational units.

Create Organisation Unit Path

  • Description: Initiates a prompt to set up an existing organizational unit path in order to synchronize with Active Directory.
  • Usage: Click this after specifying the details to create a new organizational path.

Scan AD OU's Users

  • Description: Scans Active Directory to find the Organizational Units (OUs) where users are already present.
  • Usage: Click this button to perform a search in Active Directory and retrieve a list of OUs that contain user accounts. This can be useful for auditing purposes or to ensure users are correctly organized within AD.
  • Expected Outcome: After scanning, the application will display the OUs along with associated user details from Active Directory.

Auto Filling

Create Address

  • Description: Automatically generates and fills in an address for the selected record.
  • Usage: Select a user record and click this to populate the address fields.

Create SAM@domain

  • Description: Constructs and fills in the SAM account name for a user based on the domain.
  • Usage: With a user record selected, click this to auto-generate the SAM account name.

Standalone APP

Install pyintaller

pip install pyinstaller

Generate the standalone app

pyinstaller --onefile your_script_name.py

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Built With

Icon   Icon   Icon

(back to top)

License

Distributed under the GNU GENERAL PUBLIC LICENSE. See LICENSE.txt for more information.

(back to top)

Contact

LinkedIn

(back to top)