Announcement

Collapse
No announcement yet.

DSMOD Command Problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • DSMOD Command Problem

    Hi guys,

    We keep the profiles of our users in a hidden share called profiles$

    Due to a planned migration, Iíve been playing about with the DSMOD command to mass edit the path to the userís profiles.

    Iíve come across the following problem and was hoping someone could help me.

    Iíve been using the dsquery command to pipe through a list of users in a specific test OU.

    If I type the command
    dsmod user Ėprofile \\path\profiles$\$username$

    The path of the user changes to exactly the above, not \\path\profiles$\Userjones as i expect it to.

    If I remove the $ from after profiles:
    \\path\profiles\$username$
    Then the username changes as expected, however I now have an incorrect path to the profiles.

    Iím know Iím not the first person to put profiles inside a hidden share so there must be a quick solution to this problem (Iím not that great with cmd prompt).

    Any help would be great.

    Thanks
    Andy

  • #2
    Re: DSMOD Command Problem

    i once write a script which changed the homedrive path.. with a little ajustment, this can also help you out...

    Code:
    Set ObjOU= GetObject ("LDAP://OU=Users,DC=domain,DC=local")
    objOU.filter=array("user")
    For Each ObjUser In ObjOU
    	Home=ObjUser.HomeDirectory
    	WScript.Echo home
    	On Error Resume next
    		If Left (UCase(home),12) = "\\Server0001\" then
    			home =Replace (UCase (home) ,"\\Server0001\","\\Server1\") 
    			WScript.Echo home 
    		End If
    	ObjUser.Put "HomeDirectory" , home
    	ObjUser.SetInfo
    Next
    Set objOU = Nothing
    http://www.microsoft.com/technet/scr.../usmdvb30.mspx
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment


    • #3
      Re: DSMOD Command Problem

      > The path of the user changes to exactly the above, not \\path\profiles$\Userjones as i expect it to.

      You know, this looks like a bug to me.

      Comment

      Working...
      X