krutosdirect.blogg.se

Powershell script to disable user accounts
Powershell script to disable user accounts







powershell script to disable user accounts

When I run the script I receive no error message and the log file is generated with no data populated.

powershell script to disable user accounts

I've compiled some things together that seem like they should work, but do not. Then create a report listing disabled users and email to our global helpdesk. When it disables it will also change the descripton to the date it was disabled on. The script would read the lastlogondate of an AD security group called “Temp Associates”, disable the accounts with lastlogondate > or = 29 days from current date and move to Disabled OU.

powershell script to disable user accounts

A colleague has reached out to me to create a PowerShell script to do the following:









Powershell script to disable user accounts