Removing Home Folder Redirection(WIP)

Synopsis: Misc Notes on cleaning up folder redirection with the intention of switching to OneDrive folder backups..

Published April 1st, 2026
Last Modified: October 16th, 2026

Intro: Occassionaly I must reverse some 'legacy' folder redirection policies in a tenant before implementing OneDrive. This can come in different flavors and has been a recent pain in the ass.






Quick Run Down

    1.) Home Directory

    2.) Local Folder Redirection (Removal)

    3.) Troubleshooting

Home Directory

  • Export current config just in case: AD Reports
  • Group Based Removal - PowerShell

  • $users = get-adgroupmember -identity "TargetGroup"
    foreach($user in $users) {
    GET-ADUSER -Identity $user -Properties HomeDirectory, homeDrive
    SET-ADUSER -Identity $User -clear homeDirectory,homeDrive
    }


Local Folder Redirection

    Auditing

      Auditing the current status of userprofiles with LFR in place can be difficult. I've recently created this script to help with that.
      LFR Audit - Is written in such a way to be ran in the system level context, from the local machine. It should run rather quickly and output a file to the specified share listing all the profiles w/ folder redirection in place.

      Additional Script Tips
    • Copy the script locally to the workstation before running.
    • Additional parameters can be added to help with success - "-ExecutionPolicy Bypass -NonInteractive -WindowStyle Hidden"

    CleanUp Script
      A very specific folder redirection script has been created, and exist here. Written in such a way to be server specific, and deployed via Intune.
      Runs in user context : GitHub Script


Troubleshooting

  • Profile can be removed completely by powershell:
  • PSGet-CimInstance -ClassName Win32_UserProfile | Where-Object {$_.LocalPath -like "*UserName*"} | Remove-CimInstance

Newest Post