Announcement

Collapse
No announcement yet.

Roaming Profile Scripts

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

  • Roaming Profile Scripts

    I made this neat little script below to update all the users with a custom roaming profile specific to the user. However the next step is to configure the userís laptop to save to there roaming profile.

    Does anyone know if itís possible to script this? If there is also a link that has a good referrence to this that would be really nice!!

    Thanks!!


    Option Explicit
    Dim oDomain
    Dim oUser
    Dim ouserPrincipalName
    Dim oSurname
    Dim oProfilePath

    Set oDomain = GetObject("LDAP://OU=XXXX,OU=XXXX,DC=XXXX,DC=XXXX,DC=com")
    For Each oUser In oDomain
    If oUser.class = "user" Then
    oUser.Get("userPrincipalName")
    oUser.Get("sn")
    ouserPrincipalName = oUser.Get("userPrincipalName")
    oSurname = oUser.Get("sn")
    oProfilePath = "\\Server\Share\" & Left(ouserPrincipalName,1) & LCase(oSurname) & "\Share"
    oUser.Put "profilepath", oProfilePath
    oUser.SetInfo
    End if
    Next
Working...
X