Disable-InactiveADUser

1.0.0

Durchsucht eine OU nach aktiven Benutzerkonten und behandelt zwei Fälle:
 1. Letzte Anmeldung liegt länger als -DaysInactive Tage zurück.
 2. Konto hat sich nie angemeldet und wurde vor mehr als -DaysInactive Tagen angelegt.
Betroffene Konten werden deaktiviert, in -TargetOU verschoben und im Feld "Büro" (physicalDeliveryOfficeName)
mit Grund und Datum markiert. Am
Durchsucht eine OU nach aktiven Benutzerkonten und behandelt zwei Fälle:
 1. Letzte Anmeldung liegt länger als -DaysInactive Tage zurück.
 2. Konto hat sich nie angemeldet und wurde vor mehr als -DaysInactive Tagen angelegt.
Betroffene Konten werden deaktiviert, in -TargetOU verschoben und im Feld "Büro" (physicalDeliveryOfficeName)
mit Grund und Datum markiert. Am Ende entsteht ein HTML-Bericht, der als Datei gespeichert und auf Wunsch
per Mail verschickt wird.

Mit -WhatIf lässt sich gefahrlos prüfen, welche Konten betroffen wären.

Show more

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name Disable-InactiveADUser

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 Torsten Weise. MIT-Lizenz.

Package Details

Author(s)

  • Torsten Weise

Tags

Powerscripting German ActiveDirectory AD Windows Fileserver

PSEditions

Desktop Core

Dependencies

This script has no dependencies.

Release Notes

Erste Veröffentlichung in der PowerShell Gallery.

FileList

Version History

Version Downloads Last updated
1.0.0 (current version) 9 11/21/2026