How do I restrict users to read-only access to their Home Directories?




  • Avatar
    Noel Fairclough

    This part of the script is incorrect in this article:  

    $homeDrive = (Get-ADUser -Identity $ -Properties homedrive).homedrive


    That is from the above sample, however it will only return the drive letter used in the Home Folder section under the Profile tab in active directory.  In most cases this will be something like "H:" getting assigned to the $homedrive variable.  But when the script moves to apply the access control, it won't know where "H:" is.


    Change the script to the following...

    $homeDrive = (Get-ADUser -Identity $ -Properties homedirectory).homedirectory


    This will ensure your $homedrive variable gets assigned the actual PATH specified (eg. \\fileserver\users\username) - then the script knows the path & folder to make read only.



    Comment actions Permalink
  • Avatar
    Rob Latino

    Hi Noel Fairclough,

    I shared your feedback with our tech strategists, and they are going to test it on a lab environment. We will update this article if the test is successful. Thank you very much for the feedback!

    Comment actions Permalink

Please sign in to leave a comment.