
AD Toolkit Lite: Outlook signature, vCard, group reports, GPO, and NTFS rights, password reminders, and account cleanup — seven scripts without installation
🌐 Machine-translated from Russian. Show original
AD Toolkit Lite — seven standalone Windows PowerShell 5.1 scripts for companies with Active Directory: a single Outlook signature, the entire employee directory in one vCard file, an HTML "who's in which groups" report for the auditor, password expiration reminders, GPO and folder rights reports, and clearing inactive accounts.
🔒 Since 17.11.2026, the source code of the AD Tools series is provided upon request: leave a request. The showcase of the series is github.com/WorkTime-kz/ad-tools.
Nothing needs to be installed: no Node.js, no settings, no passwords. RSAT modules are not needed except for the GPO report: it needs the GroupPolicy module. Scripts read AD embedded in Windows [adsisearcher] on behalf of whoever runs them and run entirely within the network, without the internet.
| Link | |
|---|---|
| 🧰 | AD Toolkit Lite — seven PowerShell scripts |
In this part:
What's New (November 2026)#
Briefly, what has changed since November 13:
- 🇰🇿 Kazakh language: the
-Language ru|kkkey for what the employee sees is Outlook signatures and password expiration emails. Without a key, the language is selected according to Windows regional settings (kk-KZ— Kazakh, others — Russian), for the task-Installis recorded during installation. Lines lie inlang\ru.psd1andlang\kk.psd1, the message in Kazakh istemplate.kk.htm. Reports for administrator and vCard remain in Russian. Translation prepared using AI, edits by native speakers are welcome. - 🐞 Password email subjects without "crakozyabr." .NET Framework cut a long UTF-8 theme in the middle of a character, and strict email clients showed garbage — this applied to Kazakh topics and the Russian IT summary. Now the topic is encoded according to RFC 2047 in the script itself; characters are not cut.
- ⚙️ CI on GitHub Actions (Windows) for each commit: encoding (UTF-8 with BOM, CRLF) and syntax of all scripts in PowerShell 5.1 and 7,
tests\Test-All.ps1in demo mode and PSScriptAnalyzer. The analyzer also found a variable$pwdin the clearing of inactive accounts that erased the built-in$PWD— fixed. - 📝
docs/TESTING.md— honestly that CI checks only in-Demo, and step-by-step manual verification of each script on the real domain. - 📦 The set is included in the ad-tools-suite — installing the entire AD Tools series at once; the settings generator automatically inserts a link to the AD SSPR portal into password reminders.
Why#
Employee data — full names, positions, departments, phone numbers, email — is already maintained in Active Directory. But everyone prepares signatures in emails themselves, colleagues' contacts have to be entered manually into the phone, the auditor's question "who is in Domain Admins, including nested groups" is answered with a long manual analysis, passwords expire suddenly, and the domain accumulates accounts of fired people and decommissioned computers for years.
AD Toolkit Lite takes what is already written in AD and turns it into finished results — without double input, server, or service account.
| Script | What does |
|---|---|
signature/Set-OutlookSignature.ps1 | Unified Outlook email signature from AD data, GPO login script, |
vcard/Export-Contacts.ps1 | The entire directory in one .vcf for phones and mail, plus CSV for Outlook |
groups/Group-Report.ps1 | HTML report "who's in which groups" with nested groups and CSV |
password-expiry/Send-PasswordExpiry.ps1 | Emails 14, 7, 3, and 1 day before password expiration, including FGPP and a link to the password change portal |
gpo-report/Get-GpoReport.ps1 | HTML GPO report: bindings, status, filters, issues, and what has changed since the previous snapshot |
ntfs-report/Get-ShareAccess.ps1 | NTFS and shared folder rights with group disclosure to users and risk marking |
stale-cleanup/Invoke-StaleCleanup.ps1 | Inactive computers and users: report, then phased shutdown, quarantine, and rollback deletion |
Each script has a key -Demo: the result on test data without connecting to AD.
Outlook Signature#
- ✉️ Label from template:
{{Поле}}substitutes a value from AD, and the row with an empty field is removed entirely. Blocks{{#Поле}}…{{/Поле}}and{{^Поле}}…{{/Поле}}are displayed only if the field is filled or empty. - 📄 Three formats: HTML, RTF, and text. The logo is placed in a folder next to the signature — data-URI is cut out in many versions of Outlook.
- ♻️ Nothing superfluous overwrites: if the data in AD, the template, and logo have not changed, the files remain as is. The log is in
%TEMP%\ad-signature.log. - ⚙️ Default signature for new emails and replies (
-SetDefault,-SetReply), disabling Microsoft 365 cloud signatures that erase on-premises (-DisableRoaming). - 🇰🇿 Russian or Kazakh (
-Language ru|kk): field labels ("Tel.:", "Mobile:", etc.) and the name of the signature. If there is no folderlangnearby, the script will substitute Russian field signatures and record this in the log — the logon script does not break the input. - 🏢 The company name and site can be passed by parameters if these fields are empty in AD.
It deploys as a user log-script via GPO from NETLOGON and operates on behalf of the user. Classic Outlook for Windows (2013–2021, Microsoft 365) is suitable; the new Outlook for Windows and Outlook in the browser do not read local signature files.
vCard Contacts#
- 📇 One
.vcfwith all included employees who have a phone or email. Imported into Android, iPhone (via icloud.com), Google Contacts, Outlook for Mac, and Thunderbird. - 📊 CSV for Outlook for Windows (
-OutlookCsv) — it imports only the first contact from.vcf. - 🎯 Filters: only the required OU (
-SearchBase) or group members based on nested (-Group). - 🖼️ Photos from AD optional (
-Photos), mobile numbers do not need to be uploaded (-NoMobile).
Group report#
- 👥 There are two types: by groups — participants including nested ones, and by users — all groups of people, direct and inherited.
- 🔗 You can see how a person got into the group: "directly," "main group," or "through A → B." The main group is restored by SID; cyclic group attachments do not loop the report.
- 🛡️ Filters: "privileged only" (Domain Admins, Enterprise Admins, Schema Admins, Administrators, operators, Key Admins, DnsAdmins, and others), "hide disabled," "hide empty groups," search.
- 📤 The "Download CSV" button exports the current view, and
-CsvFileimmediately writes a full effective membership table for Excel.
Lite version limitations: users and groups of the current domain are included in the report — computers, contacts, and participants from other domains are not shown.
Password reminders#
- 📬 Emails 14, 7, 3, and 1 day before password expiration (
-Days) with a link to the password change portal (AD SSPR). The text is edited in templatetemplate.htm, in Kazakh —template.kk.htm(-Language kk). The subject is encoded according to RFC 2047 without cut-off characters. - 🧮 The term is taken from
msDS-UserPasswordExpiryTimeComputedthat already takes into account both the domain policy and the Fine-Grained Password Policy. - 🧪 Secure startup:
-WhatIfsends nothing and writes a CSV report showing who and why the email would have been sent, while the-TestTosends all emails to one address during the pilot's time. - 📋 IT summary (
-AdminTo): "change at next login," accounts without email, and expired passwords. Daily launch —-Install.
GPO report#
- 🗂️ All policies have problem search and flagging: unbound, all bindings disabled, disabled, empty, AD and SYSVOL versions differ, no read rights for Authenticated Users or Domain Computers, empty security filter.
- 🔄 What has changed since the previous snapshot: new and remote GPOs, renamings, status, versions, bindings, security filters, and WMI.
This is the only set script that requires the GroupPolicy (RSAT) module. It is not needed for -Demo .
Folder permissions#
- 📁 By folders: shared folder and NTFS rights, who belongs to each group (with nested ones), what is inherited, and what is issued in that folder. By users: which folders a person has access to and through which group.
- ⚠️ Risk marking: entry for Everyone, Authenticated Users, Domain Users, or BUILTIN\Users, rights granted directly to the user, inheritance break, full access for Everyone at the shared folder level.
- 📤 Specific paths (
-Path) or all shared server folders (-Server), report in HTML and CSV. The script changes nothing.
Inactive accounts#
- 🧹 Step by step: first the report, then disconnect (
-Disable) and transfer to the quarantine OU (-Move), and after a set period — delete (-Delete) only those disabled by the script itself. Each stage supports-WhatIf. - ↩️ Rollback disabling and transferring via CSV (
-Rollback), logs, and reports in CSV and HTML. Deletion via CSV is not rolled back — the deleted object is restored from the AD recycle bin. - 🛡️ Error protection: domain controllers, built-in accounts, system objects, and cluster names are never touched, accounts with default
adminCount=1are skipped,-Limitlimits the number of changes per startup.
Quick start#
Try without AD, on test data:
powershell -ExecutionPolicy Bypass -File .\signature\Set-OutlookSignature.ps1 -Demo
powershell -ExecutionPolicy Bypass -File .\vcard\Export-Contacts.ps1 -Demo
powershell -ExecutionPolicy Bypass -File .\groups\Group-Report.ps1 -Demo
The -Demo key is also present in the other four scripts.
If you downloaded the archive from GitHub (after gaining access), first uncheck the "from the internet" tag: Get-ChildItem -Recurse .\ad-toolkit-lite | Unblock-File.
Contacts, group and GPO reports, as well as reminder mailings, can be run on a schedule: the -Install key creates a scheduler task that runs on behalf of SYSTEM, i.e., the computer account. No password is needed — it is enough to grant this computer the right to write to the target folder. For contacts and group reporting, the period is set -EveryMinutes (by default once a day), deleting the task is -Uninstall. The NTFS rights report and clearing of inactive accounts are run manually, under the administrator account.
Requirements: computers in a domain with Windows 10/11 or Windows Server 2016 or newer, built-in Windows PowerShell 5.1. Linux and Docker are not supported — ADSI is only available on Windows.
The repository includes detailed instructions for administrators: preparing fields in AD, why a service account is not needed, signing via GPO and execution policy, scheduled contacts and reports, password reminders, GPO and NTFS rights reports, step-by-step clearing of inactive accounts, file sharing via shared folder, IIS or GPO shortcut, trouble table, and security checklist.
Security: six scripts only read AD and do not change anything in it. Clearing inactive accounts changes AD only with explicit keys and rollback capability. Passwords are not stored anywhere, and scripts do not listen to network ports. The group report shows the composition of privileged groups — put it in a folder accessible only to auditors.
Project status#
- GPL-3.0 license, source code available upon request.
- There is an auto-test
tests/Test-All.ps1(97 checks): runs all scripts in demo mode and checks encoding, hiding empty fields, ensuring that rerunning does not overwrite anything, vCard format, recursion and group loops, email and-WhatIfschedule, RFC 2047 email topics in Russian, Kazakh, and with emojis, signature and email in Kazakh, GPO issues and snapshot comparison, NTFS risks (including on real temporary folder ACLs), all cleanup and rollback stages. - CI on GitHub Actions per commit: encoding and syntax in PowerShell 5.1 and 7,
Test-All.ps1in Windows PowerShell 5.1, and PSScriptAnalyzer. - Working with real Active Directory, mail server, and Outlook has not yet been tested. This cannot be verified in CI:
[adsisearcher]works only on Windows in the domain, so scripts against the Samba AD stand are not run but are automatically checked only in-Demo. The procedure for manual domain verification is indocs/TESTING.md. We are looking for administrators willing to try it themselves and share what they found.
How to help#
- ⭐ Give a star to the ad-tools showcase if the project is useful.
- 🧪 Try it on your domain (start with
-Demoandtests\Test-All.ps1, then manually check fromdocs/TESTING.md) and write in the comments what worked and what didn't. - 🇰🇿 If you are a native Kazakh speaker — check the signature and password letter in Kazakh and send your corrections.
- 🛠️ Questions and access requests — through the Issues storefront; after gaining access, send issues and pull requests to the service repository.
Need a phone directory? Check out neighboring projects: AD PhoneBook and AD PhoneBook Lite. Password reminders lead to the AD SSPR password change portal. Hiring and firing employees and group access requests via the web interface are in AD Onboarding and AD Access, LAPS passwords are in AD LAPS.
👉 AD Toolkit Lite: source code — upon request, leave a request. Series showcase — github.com/WorkTime-kz/ad-tools.
Comments · 0
No comments yet.Sign in to comment, rate and see all comments.