locked
Script does not work properly even thought it completes with success. RRS feed

  • Question

  • I created a script that maps a profile to a particular path for a user in AD. I execute the script with success. It appears in the profile path of the user properties. However, as soon as I login with that user's credentials it will not point the desired path.  it creates a temp profile instead.

    Now this is the weird thing.. I go back to the profile properties of the user and type manually the same path and click apply. I boot the computer and the profile points to right path!

    The same thing happens with pointing to home directory path and adding a user to a particular AD group.

    Do I have a ghost in my AD?



    • Edited by rsolman Monday, May 15, 2017 8:38 PM
    • Moved by Bill_Stewart Friday, July 7, 2017 6:51 PM Unanswerable drive-by question
    Monday, May 15, 2017 8:30 PM

All replies

  • No - I think you need to learn more about AD and then try t understand how that effects what you are trying to do.

    A users profile path is created locally by Windows.  You cannot assign this path. You can assign a home drive and path but that is old WinNT 4.  In modern AD we use Group Policy to create the network based folders which si done automatically by Group Policy.  GP allows ius to set a drive to the folders it creates.

    If you want to "roam" the profiles then that is done by setting up a roaming share and setting the security correctly.  When you assign a user profile to roam you would use %username% and the root folder path.  When the users is roamed the folders will be created.

    This has nothing to do with home drive/folder.

    Until you learn how this works you stand a good chance of creating an unmanageable setup.


    \_(ツ)_/

    Monday, May 15, 2017 8:56 PM
  • Hi Jrv,

    Regarding to your statement, A users profile path is created locally by Windows

    But we can change the profile path via registry, Correct ?

    Sunday, May 28, 2017 6:13 PM
  • If you want to migrate the local user profile to domain environment when you joined to domain, I have written a script for that. Check it out.

    https://gallery.technet.microsoft.com/scriptcenter/Script-to-Join-Active-7b16d9d3?redir=0

    The problem in your script may be permission issue. I think your script doesn't set permission to domain user so that he can use the old profile when he joins to domain. That's the reason why new temp profile is created.

    Sunday, May 28, 2017 6:19 PM