Skip to content

ClemensRichterr/DisableOldComputersInAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

DisableOldComputersInAD

Story

I wrote this Powershell script because I kept coming across outdated computers or computers that don't even exist physically but are still in the AD, which is annoying if you have, for example, management software that keeps retrieving the computers via LDAP. At the same time, the script also increases security because you don't want to have any outdated computers in the AD in principle.

Usage

  1. Copy the Powershell script to the domain controller, for example.
  2. Adapt the variables at the beginning of the script to your environment
  3. If you want to check which computers are affected at the beginning, simply comment out the following line with # at the beginning of the line, i.e. as follows.
#Disable-ADAccount -Identity $item.SamAccountName
  1. If necessary, you can also include the script in the task scheduling and let yourself be notified automatically.
  2. Have fun.

Note of Thanks

Thanks for www.der-windows-papst.de ✌, because this script gave me the inspiration to build something like this!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published