Fixing home drive permissions

One of the tasks that seems to come up fairly regularly when managing school servers is fixing the permissions for home directories. For whatever reason, the permissions for these can get messed up and need a quick tweak to reset them to the default.

This Powershell script does just that. There are a couple of requirements:

  1. The person running the script needs adequate permissions to edit the permissions for all the directories
  2. The directories need to be named using the usernames of the owner of the home directories

This code sets domain admin as the owner of the folder, removes the old permissions, then adds the new permissions.

tony Written by:

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *