Avatar of mrfite
mrfite
Flag for United States of America asked on

Roaming Profiles - AD Attribute

I am stuck.

I am trying to put together a termination script for former employees.

The issue is that we use gpo's to redirect their profiles to different servers.  One other issue is that when a user's username changes (ie married, divorced, etc), we continue to redirect their roaming profile to the old profile created under the original user account.

I have tried using the following AD attributes:
msTSProfilePath
msTSHomeDirectory
ProfilePath
psbase.InvokeGet("terminalservicesHomeDirectory")
psbase.InvokeGet("terminalservicesprofilepath")

The above all show as blank.  

If we manually input the users information in AD under Remote Desktop Services Profile, the correct information is only shown under psbase.InvokeGet("terminalservicesHomeDirectory") and psbase.InvokeGet("terminalservicesprofilepath")

Is there an AD attribute that holds the current roaming profile and roaming home directory information even if that location is redirected based on a GPO?


***The purpose of the script is to find a user's roaming profiles and roaming home directory on a file server and then to move those folders to an archive server after the user is no longer with us.
Active DirectoryPowershellShell ScriptingWindows OS

Avatar of undefined
Last Comment
yo_bee

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
yo_bee

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61