I'm working on user deprovision and need to re-assign a user's home directory to the manager's home directory after disabling. I found a PowerShell script on this site to re-assign the home directory to the manager, but it only works if those fields are populated in Adaxes. We cannot populate the home directory fields, as our user drives are assigned via login scripts and having a value assigned in Adaxes to the home directory path will step on the script and it will fail to run correctly.
I've been tampering with the PowerShell script on this site to try and modify it for our needs. Each user's home directory is in a path similar to \server\volume\users\%username%. Retrieving the user's home directory path is easy, since I can add the variable for %username%. However, how do I retrieve the same for the Manager? I'm a PowerShell novice, so excuse my ignorance.