This repository contains a collection of useful PowerShell scripts for managing Active Directory Domain Services (ADDS). These scripts are designed to simplify common administrative tasks and improve efficiency when working with ADDS.
Active Directory Domain Services (ADDS) is a powerful directory service used to manage users, groups, computers, and other objects within a Windows domain. This repository provides a set of PowerShell scripts to help administrators streamline various management tasks.
getdisconnectedcomputers.ps1
: Returns a list of computers that have not connected since a specified number of days and their last logon date.getpwdneverexpiresusers.ps1
: Returns a list of users who have the "Password Never Expires" option checked.removedisconnectedcomputers.ps1
: Removes computers from Active Directory. This script can use the output ofgetdisconnectedcomputers.ps1
as input through the pipeline. Also, it provides additional info that can be saved to a file with the-logFile
parameter.
Before using the scripts, ensure you have the following:
- Windows environment with PowerShell installed.
- Appropriate permissions to manage Active Directory objects.
- Clone this repository to your local machine.
- Open PowerShell and navigate to the folder containing the scripts.
- Run the desired script.
⚠️ Please use the scripts responsibly and carefully, as they may modify critical AD objects.
Contributions are welcome! If you have improvements, bug fixes, or new scripts to add, feel free to submit a pull request.
The content of this repository is licensed under the MIT License. You are free to use, modify, and distribute the code, but please include appropriate attribution.