Sync Center and Network Drives 2021

Non-Profit IT Manager 96 Reputation points
2021-01-07T22:19:04.817+00:00

I am using FolderRedirection GPO on a Windows Server 2019 Standard, most of our client computers are Windows 10, we have a few that are Windows 8.1.

Some client computers of users who use heavily network drives (which are provided by a centralized QNAP Linux-based NAS) are experiencing the following:

I found this on another locked thread from a home user having exactly the same issue I am having:

https://answers.microsoft.com/en-us/windows/forum/windows_7-networking/sync-center-and-network-drives/6b22ff59-0687-4092-bd9c-e3f29353541a

"I have been having a strange problem where Sync Center seems to be storing network drives as offline folders.
Even though I am connected to the network all the time and the network drives never go offline they still become unavailable.

The network drive appears in the sync partnerships but I have not set these up and have been unable to remove them even when turning offline files off and back on again.

The only Sync which should be there is the folder for eel1651 the rest are network drives which it should not be trying to Sync. It is causing files to become unavailable even when I am currently working on them, so I can't save them..."

I am using "net use" as netlogon scripts to mount different shares from the NAS, I mount them as a drive "P:\," but two of our sever users needs to constantly access one of the shares in that NAS. Every few days (sometimes only hours) the Sync Center adds that drive as a sync partnership and it renders the P:\ drive useless since it only lets the user see very few files and not the entire directory.

I tried enabling the "Remove "Make Available Offline" for these files and folders" from the FolderRedirection GPO adding every NAS Shared folder, I also tried the 'Remove "Make Available Offline" command" from the same GPO (not at the same time, because those two policies are contradictory) to no avail, it keeps coming back.

Every few days (sometimes hours), I have to remote-in, disable the "Offline Files," restart, the login as Administrator, browse to 'C:\Windows\CSC', play around for a while with the permissions, and remove the additional namespace "\10.0.0.66\Legal" and then I log out, go back to the user to whom this is happening to, re-enabled "Offline Files" and then when I restart it is gone.

And, it comes back later, for the user that was having the same issue, somehow it just did not happen again after resetting his Windows back to default, then it just stopped. But, with this other user, I already reset the computer back to default twice, and the issue keeps coming back.

Any ideas... Please help...

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,708 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,456 questions
Windows Server Infrastructure
Windows Server Infrastructure
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Infrastructure: A Microsoft solution area focused on providing organizations with a cloud solution that supports their real-world needs and meets evolving regulatory requirements.
535 questions
0 comments No comments
{count} votes

Accepted answer
  1. Non-Profit IT Manager 96 Reputation points
    2021-01-19T01:24:12.587+00:00

    I thought about a workaround, since there seems to not be any permanent solution from a GPO level, how about I run a startup script for all users. It would need to check the CSC\namespace folder for the existence of 10.0.0.66, take ownership of the folder and delete it. That way, once the boot sequence is completed and the Sync Center starts, that Sync Partnership is already deleted.

    To avoid any time-consuming processes that could delay the boot up, I would need it to check if CSC\v2.0.6\namespace\10.0.0.66 exists, and if it does, to take ownership of it as Administrator and then delete it.

    I imagine it will first check the echo of the CMD dir command, and then if 10.0.0.66 exist, goto take ownership, and when the ownership is done, then delete and exit.

    I am not even sure how to check the echo of a command like dir, anyone who could give me any suggestions?

    I am thinking it would have to be something like this:

    ::::::::::::::::::::::::::::::::::::::::::::
    :: Automatically check & get admin rights
    ::::::::::::::::::::::::::::::::::::::::::::
    @echo off
    CLS
    ECHO.
    ECHO ===============================
    ECHO Running Admin Command Prompt
    ECHO ===============================
    
    :init
    setlocal DisableDelayedExpansion
    set "batchPath=%~0"
    for %%k in (%0) do set batchName=%%~nk
    set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
    setlocal EnableDelayedExpansion
    
    :checkPrivileges
    NET FILE 1>NUL 2>NUL
    if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
    
    :getPrivileges
    if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
    ECHO.
    ECHO **************************************
    ECHO Invoking UAC for Privilege Escalation
    ECHO **************************************
    
    ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
    ECHO args = "ELEV " >> "%vbsGetPrivileges%"
    ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
    ECHO args = args ^& strArg ^& " "  >> "%vbsGetPrivileges%"
    ECHO Next >> "%vbsGetPrivileges%"
    ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
    "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %*
    exit /B
    
    :gotPrivileges
    setlocal & pushd .
    cd /d %~dp0
    if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul  &  shift /1)
    
    ::::::::::::::::::::::::::::
    ::START
    ::::::::::::::::::::::::::::
    
    :start
    cd C:\Windows\CSC\v2.0.6\namespace
    dir
    if '%1' == 'dir' ( echo 10.0.0.66 /1 & goto takeOwnership ) else ( goto Exit )
    
    :takeOwnership
    takeown /f C:\Windows\CSC\v2.0.6\namespece\10.0.0.66\* /R /A
    ::::::::::::::::::::::::::::::
    ::Incomplete step
    ::::::::::::::::::::::::::::::
    if '%1' == 'takeown' ( echo ::missing text:: goto delPartnership ) else ( goto Start )
    
    :delPartnership
    del C:\Wndows\CSC\v2.0.6\namespace\10.0.0.66 /y
    cd C:\Windows\CSC\v2.0.6\namespace
    dir
    if '%1' == 'dir' ( echo 10.0.0.66 /1 & goto Start ) else ( goto Exit )
    
    :Exit
    exit
    

    Can anyone check if I am correct?


5 additional answers

Sort by: Most helpful
  1. Hannah Xiong 6,276 Reputation points
    2021-01-08T06:27:18.677+00:00

    Hello,

    Thank you so much for posting here.

    We have not experienced the same or similar issue as described. As per my understanding, if we disable the "offline Files", there is no such issue. This issue only occurred when we enable "Offline Files". If there is any misunderstanding, please let me know.

    Since we enable "Offline Files", how the offline settings are configured? Such as:

    54791-111.png

    The options are shown as below"

    Only the files and programs that users specify are available offline: the user must select the files from the shared folder that he wants to be cached to the hard disk, and only the selected files can be used offline.
    No files or programs from the shared folder are available offline: it means that the shared folder does not provide offline functions.
    All files and programs that users open from the shared folder are automatically available offline: as long as the files that the user has accessed in the shared folder, they will be automatically cached in the user's hard disk for offline use.

    Thank you so much for your understanding and support.

    Best regards,
    Hannah Xiong

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Hannah Xiong 6,276 Reputation points
    2021-01-11T02:29:00.97+00:00

    Hello,

    Thank you so much for your kindly reply.

    As per my understanding, if the other sync partnership to be added automatically, we could kindly have a check whether we configured the group policy as shown below.

    55163-11.png

    To check the group policy result, Open CMD, run as administrator and then run gpresult /h C:\report.html.

    For any question, please feel free to contact us.

    Best regards,
    Hannah Xiong

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Non-Profit IT Manager 96 Reputation points
    2021-01-11T18:41:42.617+00:00

    Again, thank you HannahXiong-MSFT.

    Maybe I should explain it again from the top.

    Our Server/Domain Controller has as part of its design, a FolderRedirection policy, it is this:

    55521-fr-gpo.png

    In other words, it includes "ApptData(Roaming)," "Desktop," "Documents," "Pictures," "Music" & "Videos" from each user's Windows profile. All that gets sync to "\CCDCMAINSERVER" as shown below.

    55389-should-be.png

    However, for some users, Windows keep automatically adding an extra sync partnership that should not be adding, a network location "\10.0.0.66\Legal," I am attempting to stop that partnership by using "Remove "Make available Offline" for these files and folders" GPO, like this

    55457-remove-make-available-offline-for-these-folder-fil.png

    But, Windows keeps adding it, and this is what we do not want

    55340-not-desired-sync-partnership-edit.png

    Any suggestions?

    0 comments No comments

  4. Hannah Xiong 6,276 Reputation points
    2021-01-12T06:11:59.243+00:00

    Hello,

    You are welcome. Thank you so much for the detailed information.

    So sorry that we did not encounter this issue before. And I failed to find the related information or solution about this issue after lots of research.

    We mainly focus on the group policy issue. As described, we have configured "Remove Make Available Offline for these files and folders" for the network location. Have we checked that the group policy is successfully applied?

    We could check by running “gpresult /h” to get a detailed group policy result report, then check if the specific settings get applied or not.

    For computer configuration:
    Logon one client and open CMD, run as administrator. Type gpresult /h C:\report.html and click Enter. Open report file to check the policies under Computer Details.

    Besides, for some users, this network location would automatically added to the sync partnership. Frankly speaking, I'm at the end of what suggestions I can offer. Maybe someone else has ran into something similar before and can chip in.

    According to my research, there are some discussion about deleting the offline file cache. I do not know whether it is helpful but hope it could be give us some inspiration.

    https://social.technet.microsoft.com/Forums/en-US/24346edb-80ed-49a7-b7b5-aecebff7b725/how-to-delete-the-offline-file-cache-or-reset-the-offline-file-cache-in-windows-10?forum=win10itpronetworking

    https://video2.skills-academy.com/en-us/troubleshoot/windows-client/networking/re-initialize-offline-files-cache-database

    Thank you so much for your understanding and support.

    Best regards,
    Hannah Xiong

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.