Script Library

Boost your management, troubleshoot, and remediation capabilities with scripts created by experts in the IT community.

<< Back to Script Library

Tag: Active Directory

(17 Scripts)
Checks for services and scheduled tasks that are configured to run using domain accounts. For such accounts, the script reports the password expiry date.
Use cases:
1) detecting expiry of accounts used for services, so that the account password may be renewed
2) detecting the use of domain accounts, as opposed to managed service accounts
Version: 1.1.12  |   Created: 2024-01-22  |   Modified: 2024-02-25  |   Creator: Bill Powell  |   Downloads: 2
This script is intended to be used to sync the Solve users, based on the membership of the specified AD Security group.
Version: 2.3.7  |   Created: 2023-09-06  |   Modified: 2023-10-26  |   Creator: Bill Powell  |   Downloads: 36
Sets a new password for an AD User and requires the user to change the password at next logon.
Version: 3.0.8  |   Created: 2023-06-05  |   Modified: 2023-06-23  |   Creator: Rein Leen/Bill Powell  |   Downloads: 10
Show all Active Directory Accounts which have not been logged into for specified days or more.
System account and accounts without any login activity are ignored by this script.
Reporting on inactive accounts will return the command to disable those accounts.
Disabling accounts will return the command to re-enable those accounts to counter mistakes.
Version: 1.1.6  |   Created: 2023-04-14  |   Modified: 2023-06-23  |   Creator: Rein Leen  |   Downloads: 18
Set "ChangePasswordAtLogon" to true on the selected users
Version: 2.1.4  |   Created: 2023-04-14  |   Modified: 2023-06-23  |   Creator: Rein Leen  |   Downloads: 8
Sets the expiration date of one or multiple user accounts in AD.
Version: 2.1.7  |   Created: 2023-04-11  |   Modified: 2023-06-23  |   Creator: Rein Leen  |   Downloads: 14
Lists all users in Active Directory with "User must change password at next logon" selected
Version: 2.1.6  |   Created: 2023-04-11  |   Modified: 2023-06-23  |   Creator: Rein Leen  |   Downloads: 15
List the synchronization status and replication errors of all domain controllers in the domain.

This script can be executed on a monitor and will request the required data via a PSSession to the domain controller(s).

This script requires the ActiveDirectory PowerShell module to function.

If errors are found, this could be a long running script. Increase the timeout if required.
Version: 2.0.0  |   Created: 2023-04-11  |   Modified: 2023-05-23  |   Creator: Rein Leen  |   Downloads: 30
Gets the Active Directory expiration date of specified users or all users within specified search bases.
Version: 2.1.12  |   Created: 2023-04-06  |   Modified: 2023-06-22  |   Creator: Rein Leen  |   Downloads: 34
Exports users from active directory to a CSV for solve user import.
Users and groups must be comma separated, if one is not used please have '$null' in the field so it does not attempt to be processed.
A user account should contain the following data, otherwise it will not be exported: userprincipalname (UPN), givenname, sn (surname), mail (emaill address), samaccountname, distinguishedname
Builtin groups such as Domain Users are not supported
Version: 1.0.19  |   Created: 2022-10-11  |   Modified: 2022-10-30  |   Creator: Steve Schneider  |   Downloads: 502
This script displays a user's Name, Company, Title, Office, Office Phone Number, Mobile Phone Number and E-Mail Address if they exist in AD, as well as those same details for their Manager.

Requires the ActiveDirectory PowerShell module loaded on machine this is be exected from.

Created by Rory Monaghan.
Version: 1.1.7  |   Created: 2018-11-26  |   Modified: 2018-11-27  |   Creator: Rory.Monaghan  |   Downloads: 218
Use VBScript to reset a user's password. The password must be at least 8 characters long.
Version: 1.2.8  |   Created: 2014-02-20  |   Modified: 2014-02-23  |   Creator: Zeev Eisenberg  |   Downloads: 185
Adds the selected user(s) to an Active Directory group or groups
Version: 4.0.6  |   Created: 2013-11-25  |   Modified: 2014-02-18  |   Creator: Zeev Eisenberg  |   Downloads: 271
Enables the Active Directory account of the selected user(s)
Version: 3.0.6  |   Created: 2013-11-24  |   Modified: 2014-02-19  |   Creator: Zeev Eisenberg  |   Downloads: 193
Disables the Active Directory account of the selected user(s)
Version: 3.0.4  |   Created: 2013-11-24  |   Modified: 2014-02-19  |   Creator: Zeev Eisenberg  |   Downloads: 204
Unlocks the Active Directory account of the selected user(s). This can be run on any computer with the AD PowerShell module installed.
Version: 2.0.3  |   Created: 2013-11-24  |   Modified: 2014-02-20  |   Creator: Zeev Eisenberg  |   Downloads: 444
Resets the password for the Active Directory account of the selected user. Best to run this on one user at a time unless you want to assign the same password to all target accounts.
Version: 3.0.6  |   Created: 2013-11-24  |   Modified: 2014-02-20  |   Creator: Zeev Eisenberg  |   Downloads: 321