User Tools

Site Tools


adsetup:options:folderredirection

Selecting this option will update the Folder Redirection policy in the $Base Enterprise User Policy. It modifies the required fdeploy1.ini1) file and updates Desktop, Documents and Favorites to a Basic - Redirect everyone's folder to the same location redirection.

The folders are updated with the following value: $DFSHomeFolder\%USERNAME%\<Folder>


Function CreateUserFolderRedirection {
    ###Default Folder Redirection

    $FolderRedirectionFile = 'fdeploy1.ini' 
    $FolderRedirectionPath = (New-Item -Path $GPEntUserPath -name "Documents & Settings" -type Directory -force)
              $FolderRedirectionXMLFile = "$FolderRedirectionPath\$FolderRedirectionFile"
              $FolderRedirectionXMLFile = $FolderRedirectionXMLFile.ToString()
    
    Add-Content $FolderRedirectionXMLFile "`r`n     `r`n[version]`r`nversion=100`r`n[Folder_Redirection]`r`n{1777F761-68AD-4D8A-87BD-30B759FA33DD}=s-1-1-0;`r`n{FDD39AD0-238F-46AF-ADB4-6C85480369C7}=s-1-1-0;`r`n{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}=s-1-1-0;`r`n[{1777F761-68AD-4D8A-87BD-30B759FA33DD}_s-1-1-0]`r`nFlags=1000`r`n
    FullPath=$DFSHomeFolder\%USERNAME%\Favorites`r`n[{FDD39AD0-238F-46AF-ADB4-6C85480369C7}_s-1-1-0]`r`nFlags=1000`r`nFullPath=$DFSHomeFolder\%USERNAME%\Documents`r`n[{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}_s-1-1-0]`r`nFlags=1000`r`nFullPath=$DFSHomeFolder\%USERNAME%\Desktop`r`n"

    AddGPPToAD $DistinguishedName $GPEntUserPolicyID "gPCUserExtensionNames" "[{25537BA6-77A8-11D2-9B6C-0000F8080861}{88E729D6-BDC1-11D1-BD2A-00C04FB9603F}]"


    }

    WriteLog $Line "LINE"
    WriteLog "Updating Group Policies in $([char]0x2192) $GPEntUser" "Info"
    CreateUserPolicies
    
    ### If the Option for Loopback Mode is "Replace" the below section will make a copy of all default Group Policies for the user in the $GPRemoteUser policy.

            If ($LoopbackMode -eq 2) {
            
            $GPEntUser = $GPRemoteUser
            If ($CreateSeparateOfficePolicy -eq $False) {$GPOfficeOptionUser = $GPRemoteUser}
            WriteLog $Line "LINE"
            WriteLog "Loopback Replace Mode selected. Updating Group Policies in $([char]0x2192) $GPRemoteUser" "Info"
            CreateUserPolicies
    
            $GPEntUser = "$Base Enterprise User Policy"
            $GPOfficeOptionUser = $GPEntUser
            } 

    
    If ($DefaultEUFR -eq $True) {
    WriteLog $Line "LINE"
    WriteLog "Updating Folder Redirection in $GPEntUser"
    CreateUserFolderRedirection
    
    }

}
1)
Location of this file is in the policies directory on the SYSVOL, under User → Documents & Settings
adsetup/options/folderredirection.txt · Last modified: 2017/03/31 16:51 by rob