Automate Disabling of Inactive Users in Windows Server | PowerShell Script

preview_player
Показать описание
Problem: Management has requested the Cyber.Me team to ensure any users that have not been active in the past 90 days to be disabled.

For this problem statement we are going to write a simple PowerShell script and automate execution using Task Scheduler. This video will cover the script in detail along with instructions on how to create a task in Task Scheduler. References are also covered in the video from Microsoft.

Links for CyberMe

References:

Music:
Artist(s) name - Tenno
Song - Daydreaming
Provided by Lofi Girl
Рекомендации по теме
Комментарии
Автор

This was very helpful as I needed a script such as this to complete a CMMC control. Thanks!

chelseaharris
Автор

Very helpful my guy much appreciate this!!!!

jddrane
Автор

how do you not disable the newly account that just created but have no logon yet.

miravida
Автор

Thanks for the script. Now that users are disabled, how do would I go about getting them moved into a specific OU?

gkcvmkt
Автор

How can i target a specific OU instead of "UsersOnly" to leave the service accounts out of this script?

luchocavieressuau
Автор

I want to disable users inactive 30days but the script I want to exclude users password never expire. Please help share me the command. Thanks

sanphearun